18.2.122. PMIx_Info_free
PMIx_Info_free — Release an array of pmix_info_t(5) structures
18.2.122.1. SYNOPSIS
#include <pmix.h>
void PMIx_Info_free(pmix_info_t *p, size_t n);
18.2.122.1.1. Python Syntax
No Python equivalent
18.2.122.2. INPUT PARAMETERS
p: Pointer to the array of pmix_info_t(5) structures to be released. This must be storage that was allocated by the library (e.g., via PMIx_Info_create(3)).n: Number of structures in the array.
18.2.122.3. DESCRIPTION
The PMIx_Info_free function releases the contents of each element in an
array of pmix_info_t(5) structures and then frees the
array storage itself. Each element is destructed exactly as by
PMIx_Info_destruct(3) — the contained
pmix_value_t(5) payload is released unless the
element has been marked persistent — after which the block of memory
holding the array is returned to the system.
If p is NULL or n is zero, the function does nothing.
PMIx_Info_free is the counterpart to
PMIx_Info_create(3). Use it only on
library-allocated array storage; to release the contents of a single caller-owned
(stack or embedded) structure without freeing it, use
PMIx_Info_destruct(3) instead.
18.2.122.4. RETURN VALUE
PMIx_Info_free returns no value (void).
18.2.122.5. NOTES
PMIx_Info_free is the OpenPMIx routine underlying the historical
PMIX_INFO_FREE macro. That macro is retained in pmix_deprecated.h for
backward compatibility; it calls this function and then sets the caller’s
pointer to NULL.
18.2.122.6. EXAMPLES
Allocate and later release an array:
pmix_info_t *info;
info = PMIx_Info_create(3);
/* ... populate and use the array ... */
PMIx_Info_free(info, 3);