Admin Production ni-theme
Current Publication

FreeAnalysisMem

LabWindows/CVI

FreeAnalysisMem

Advanced Analysis Library Only

void FreeAnalysisMem (void *pointer);

Purpose

Frees the memory that PeakDetector allocated internally for the output arguments.

The following code example shows how to use FreeAnalysisMem in conjunction with PeakDetector.

main()

{
double *x = NULL;
double *amplitudes = NULL;
double *locations = NULL;
double *secondDerivatives = NULL;
err = 0;
xSize;
/* Insert code here to determine xSize. */
x = (double *)malloc (xSize * sizeof(double));
err = PeakDetector(x, xSize, 0.01, 3, 0, 1, 0, &count, &locations, &amplitudes, &secondDerivatives);
/* Memory is allocated internally by the PeakDetector function for the locations, amplitudes and second_derivatives outputs. Use the FreeAnalysisMem function to free this memory. */
FreeAnalysisMem(locations);
FreeAnalysisMem(amplitudes);
FreeAnalysisMem(secondDerivatives);
}

Parameters

Input
Name Type Description
pointer void * Pointer to the memory to free.

Return Value

None.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Example

Refer to analysis\phasedif.cws for an example of using the FreeAnalysisMem function.