18.2.121. PMIx_Info_destruct

PMIx_Info_destruct — Release the contents of a pmix_info_t(5)

18.2.121.1. SYNOPSIS

#include <pmix.h>

void PMIx_Info_destruct(pmix_info_t *p);

18.2.121.1.1. Python Syntax

No Python equivalent

18.2.121.2. INPUT PARAMETERS

  • p: Pointer to the pmix_info_t(5) structure whose contents are to be released. The storage for the structure itself is not freed — it is assumed to belong to the caller (typically declared on the stack or embedded within another object).

18.2.121.3. DESCRIPTION

The PMIx_Info_destruct function releases any memory held by the pmix_value_t(5) payload contained within the info structure. It does not free the pmix_info_t storage itself; that remains the responsibility of the caller.

If the info structure has been marked persistent (see PMIx_Info_persistent(3)), the contained value is left untouched — a persistent info does not own its value, so its memory is deliberately not released.

PMIx_Info_destruct is the counterpart to PMIx_Info_construct(3). A structure that was allocated as part of an array by PMIx_Info_create(3) should be released with PMIx_Info_free(3) instead, which destructs each element and frees the array storage.

18.2.121.4. RETURN VALUE

PMIx_Info_destruct returns no value (void).

18.2.121.5. NOTES

PMIx_Info_destruct is the OpenPMIx routine underlying the historical PMIX_INFO_DESTRUCT macro. That macro is retained in pmix_deprecated.h for backward compatibility and simply expands to a call to this function; new code may call either form.