# FreeDescriptor

Frees memory allocated for a descriptor.

## Syntax

Fortran:

Status = DftiFreeDescriptor( Desc_Handle )

C:

status = DftiFreeDescriptor( &desc_handle );

## Description

This function frees up all memory space allocated for a descriptor.

### Note

Memory allocation/deallocation inside Intel MKL is managed by Intel MKL Memory Manager. So, even after successful completion of FreeDescriptor, the memory space may continue being allocated for the application because the Memory Manager sometimes does not return the memory space to the OS but considers the space free and can reuse it for future memory allocation. See Example “MKL_FreeBuffers Usage with FFT Functions” on how to use Intel MKL Memory Manager and actually release memory.

The function returns `DFTI_NO_ERROR` when completes successfully. See Status Checking Functions for more information on returned status.

## Interface and Prototype

! Fortran interface

INTERFACE DftiFreeDescriptor

//Note that the body provided here is to illustrate the different

//argument list and types of dummy arguments. The interface

//does not guarantee what the actual function names are.

//Users can only rely on the function name following the

//keyword INTERFACE

FUNCTION some_actual_function_3( Desc_Handle )

INTEGER :: some_actual_function_3

TYPE(DFTI_DESCRIPTOR), POINTER :: Desc_Handle

END FUNCTION some_actual_function_3

END INTERFACE DftiFreeDescriptor

/* C prototype */

long DftiFreeDescriptor( DFTI_DESCRIPTOR_HANDLE * );

Parent topic: Descriptor Manipulation Functions