18.2.95. PMIx_Value_destruct

PMIx_Value_destruct — Release the contents of a pmix_value_t(5) structure.

18.2.95.1. SYNOPSIS

#include <pmix.h>

void PMIx_Value_destruct(pmix_value_t *val);

18.2.95.1.1. Python Syntax

No Python equivalent

18.2.95.2. INPUT PARAMETERS

  • val: Pointer to the pmix_value_t(5) structure whose contents are to be released.

18.2.95.3. DESCRIPTION

Release any heap memory referenced by the payload of a pmix_value_t(5) — for example, a string, a nested pmix_data_array_t, a byte object, or any other type that owns allocated storage. The specific action taken is determined by the value’s type field. Scalar payloads (integers, booleans, sizes, and the like) own no separate storage and require no release.

PMIx_Value_destruct frees only the contents of the structure; it does not free the storage occupied by the pmix_value_t itself. It is the counterpart to PMIx_Value_construct(3) and is intended for values whose storage the caller supplied (stack or embedded). To release an array of values that was heap-allocated by PMIx_Value_create(3), use PMIx_Value_free(3) instead, which destructs the contents and frees the array storage.

18.2.95.4. RETURN VALUE

PMIx_Value_destruct returns no value (void).

18.2.95.5. NOTES

PMIx_Value_destruct is an OpenPMIx convenience routine. The corresponding macro-style interface for this operation is PMIX_VALUE_DESTRUCT.