FREEMEM - De-allocate untyped variable

Language reference ›› Built-in procedures ›› Dynamic memory management ››
Parent Previous Next

FREEMEM(identifier, size)

Free the dynamic variable pointed to by the given variable.


<identifier> is any untyped or typed pointer variable.


<size> is the allocated byte count. It should be the same size that was given at allocation time.


There is no heavy check for pointer coherency (there is only a check that this is a valid RAM address).


The allocated memory should have been allocated by a call to the NEW or GETMEM standard built-in procedures.


This procedure is implemented only for HIGHPERF (PIC18) and ENHANCED (PIC16'1xxx).


See also: GETMEM, PMP dynamic memory allocation.