# FreeDescriptorDM

Frees memory allocated for a descriptor.

## Syntax

Fortran:

Status = DftiFreeDescriptorDM(handle)

C/C++:

status = DftiFreeDescriptorDM(&handle);

## Input Parameters

handle
  The descriptor handle. Must be valid, that is, created in a call to DftiCreateDescriptorDM.

## Output Parameters

handle | The descriptor handle. Memory allocated for the handle is released on output.

## Description

This function frees up all memory allocated for a descriptor in a particular MPI process. Call the DftiFreeDescriptorDM function to delete the descriptor handle. Upon successful completion of DftiFreeDescriptorDM the descriptor handle is no longer valid.

## Return Values

The function returns `DFTI_NO_ERROR` when completes successfully. If the function fails, it returns a value of another error class constant (for the list of constants, refer to Error Codes).

## Interface and Prototype

! Fortran Interface

INTERFACE DftiFreeDescriptorDM

INTEGER(4) FUNCTION DftiFreeDescriptorDM(handle)

TYPE(DFTI_DESCRIPTOR_DM), POINTER :: handle

END FUNCTION

END INTERFACE

/* C/C++ prototype */

long DftiFreeDescriptorDM(DFTI_DESCRIPTOR_DM_HANDLE *handle);

Parent topic: Descriptor Manipulation Functions