Visible to Intel only — GUID: GUID-CED91994-931E-424A-B198-9A618C1ACBF5
Visible to Intel only — GUID: GUID-CED91994-931E-424A-B198-9A618C1ACBF5
CFI_deallocate
C function prototype: Deallocates memory for an object described by a C descriptor.
int CFI_deallocate (CFI_cdesc_t *dv);
Formal Parameters:
dv |
The address of a C descriptor describing the object. It must have been allocated using the same mechanism as the Fortran ALLOCATE statement. If the object is a pointer, it must be associated with a target satisfying the conditions for successful deallocation by the Fortran DEALLOCATE statement. |
Description
Successful execution of CFI_deallocate deallocates memory for the object using the same mechanism as the Fortran DEALLOCATE statement, and the base_addr member of the C descriptor becomes a null pointer.
If an error is detected, the C descriptor is not modified.
Result Value
The result is an error indicator.
Example
If dv is the address of a C descriptor for the Fortran array A declared as follows:
REAL, ALLOCATABLE :: A(:, :)
and the array is allocated, the following code deallocates it:
int ind; ind = CFI_deallocate(dv);