18.2.96. PMIx_Value_free

PMIx_Value_free — Release an array of pmix_value_t(5) structures allocated by PMIx_Value_create(3).

18.2.96.1. SYNOPSIS

#include <pmix.h>

void PMIx_Value_free(pmix_value_t *v, size_t n);

18.2.96.1.1. Python Syntax

No Python equivalent

18.2.96.2. INPUT PARAMETERS

  • v: Pointer to the array of pmix_value_t(5) structures to be released.

  • n: Number of structures in the array.

18.2.96.3. DESCRIPTION

Release an array of pmix_value_t(5) structures that was allocated by PMIx_Value_create(3). For each of the n elements, the routine first destructs the element’s contents — freeing any heap memory referenced by its payload, exactly as PMIx_Value_destruct(3) does — and then frees the array storage itself.

If v is NULL the routine returns immediately. The caller must supply the same count n that was passed to PMIx_Value_create(3).

Do not use PMIx_Value_free on a value whose storage the caller supplied (a stack or embedded pmix_value_t(5)); for those, use PMIx_Value_destruct(3), which releases the contents without attempting to free the structure storage.

18.2.96.4. RETURN VALUE

PMIx_Value_free returns no value (void).

18.2.96.5. NOTES

PMIx_Value_free is an OpenPMIx convenience routine. The corresponding macro-style interface for this operation is PMIX_VALUE_FREE.