18.2.133. PMIx_Pdata_destruct

PMIx_Pdata_destruct — Release the contents of a pmix_pdata_t(5) structure.

18.2.133.1. SYNOPSIS

#include <pmix.h>

void PMIx_Pdata_destruct(pmix_pdata_t *p);

18.2.133.1.1. Python Syntax

No Python equivalent

18.2.133.2. INPUT PARAMETERS

  • p: Pointer to the pmix_pdata_t(5) structure whose contents are to be released.

18.2.133.3. DESCRIPTION

Release any dynamically allocated memory held by the value field of a pmix_pdata_t structure. Only the payload contained within the structure is freed; the storage for the pmix_pdata_t structure itself is not freed, since that storage was provided by the caller.

PMIx_Pdata_destruct is the counterpart to PMIx_Pdata_construct(3) and should be applied to structures that were initialized with that routine (or otherwise declared on the stack or embedded in another object). To release an array of structures that was allocated by PMIx_Pdata_create(3), use PMIx_Pdata_free(3) instead, which destructs each element and frees the array storage.

18.2.133.4. RETURN VALUE

PMIx_Pdata_destruct returns no value (void).

18.2.133.5. EXAMPLES

Construct, use, and destruct a structure:

pmix_pdata_t pdata;

PMIx_Pdata_construct(&pdata);
/* ... populate and use pdata ... */
PMIx_Pdata_destruct(&pdata);