18.2.171. PMIx_Regattr_free

PMIx_Regattr_free — Release an array of pmix_regattr_t(5) structures and their contents.

18.2.171.1. SYNOPSIS

#include <pmix.h>

void PMIx_Regattr_free(pmix_regattr_t *p, size_t n);

18.2.171.1.1. Python Syntax

No Python equivalent

18.2.171.2. INPUT PARAMETERS

  • p: Pointer to the array of pmix_regattr_t(5) structures to be released.

  • n: Number of structures in the array.

18.2.171.3. DESCRIPTION

Release an array of pmix_regattr_t structures that was allocated by PMIx_Regattr_create(3). The function first destructs each of the n elements — freeing their name and description contents, exactly as PMIx_Regattr_destruct(3) would — and then frees the storage of the array itself.

If p is NULL or n is zero, the function does nothing.

18.2.171.4. RETURN VALUE

PMIx_Regattr_free returns no value (void).

18.2.171.5. NOTES

The PMIX_REGATTR_FREE convenience macro is a direct wrapper for this function; in addition to calling it, the macro sets the caller’s pointer to NULL.

Use PMIx_Regattr_free only on storage obtained from PMIx_Regattr_create(3). For a caller-provided (stack or embedded) structure, use PMIx_Regattr_destruct(3) instead, which releases the contents without freeing the structure storage.