18.2.198. PMIx_Device_distance_free

PMIx_Device_distance_free — Release an array of pmix_device_distance_t(5) structures allocated by PMIx_Device_distance_create(3).

18.2.198.1. SYNOPSIS

#include <pmix.h>

void PMIx_Device_distance_free(pmix_device_distance_t *d, size_t n);

18.2.198.1.1. Python Syntax

No Python equivalent

18.2.198.2. INPUT PARAMETERS

  • d: Pointer to the array of pmix_device_distance_t(5) structures to be released. May be NULL, in which case the call is a no-op.

  • n: Number of structures in the array.

18.2.198.3. DESCRIPTION

Release an array of pmix_device_distance_t structures that was previously allocated by PMIx_Device_distance_create(3). The function destructs each of the n elements — freeing the uuid and osname strings of every member — and then frees the array storage itself. If d is NULL the function returns immediately.

Use this routine only on array storage that the library allocated. A single structure that was initialized with PMIx_Device_distance_construct(3) must be released with PMIx_Device_distance_destruct(3) instead, since its storage was provided by the caller.

18.2.198.4. RETURN VALUE

PMIx_Device_distance_free returns no value (void).

18.2.198.5. NOTES

Unlike PMIx_Device_distance_destruct(3), which releases only the contents of a structure, PMIx_Device_distance_free also frees the memory occupied by the array itself.