# free_Helmholtz_2D/free_Helmholtz_3D

Cleans the memory allocated for the data structures used by the FFT interface.

## Syntax

void free_Helmholtz_2D(DFTI_DESCIPTOR* xhandle, int* ipar, int* stat);

void free_Helmholtz_3D (DFTI_DESCIPTOR* xhandle, DFTI_DESCIPTOR* yhandle, int* ipar, int* stat);

## Input Parameters

xhandle, yhandle | DESCIPTOR_HANDLE*. Data structures used by the Intel MKL FFT interface (for details, refer to FFT Functions). The structure yhandle is used only by free_Helmholtz_3D.
ipar | int array of size 128. Contains integer data to be used by Fast Helmholtz Solver (for details, refer to Common Parameters).

## Output Parameters

xhandle, yhandle | Data structures used by the Intel MKL FFT interface. Memory allocated for the structures is released on output.
ipar | Contains integer data to be used by Fast Helmholtz Solver. Status of the routine call is written to ipar[0].
stat | int*. Routine completion status, which is also written to ipar[0].

## Description

The routine cleans the memory used by the xhandle and yhandle structures, needed for calling the Intel MKL FFT functions. To release memory allocated for other parameters, include cleaning of the memory in your code.

## Return Values

stat= 0 | The routine successfully completed the task.
stat= -1000 | The routine stopped because of an Intel MKL FFT or TT interface error.
stat= -99999 | The routine failed to complete the task because of a fatal error.

Parent topic: PL Routines for the Cartesian Solver