free
void free (void *memBlockPointer);
Purpose
Causes the space pointed to by memBlockPointer to be deallocated.
To avoid unexpected behavior and dangling pointers, make sure all pointers to the deallocated memory are updated.
Parameters
Input | ||
Name | Type | Description |
memBlockPointer | void * | Contains a pointer to the memory block whose space is deallocated. If a null pointer is entered into this parameter, no action occurs. If the argument does not match a pointer previously obtained by the calloc, malloc, or realloc function, or if the space has already been deallocated, the behavior is undefined. |
Return Value
None.
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Examples
Refer to the following examples that use the free function: