free
Frees a previously allocated memory block
#include <stdlib.h>
#include <nwmalloc.h>
void free (
void *ptr);
The free function returns no value.
When the value of ptr is NULL, the free function does nothing; otherwise, the free function deallocates the memory block located by the ptr parameter. The ptr parameter is 32 bits.
After a call to free, the freed memory block is available for allocation.
calloc, malloc, NWGarbageCollect (NDK: NLM Development Concepts, Tools, and Functions), realloc
#include <nwmalloc.h> #include <stdlib.h> main () { char *ptr; free (ptr); }