DISPOSE - De-allocate typed variable

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

DISPOSE(identifier)

Free the dynamic variable pointed to by the given variable.


<identifier> is any typed pointer variable. The size of the freed memory block depends of the size of the type pointed by <identifier>.


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: NEW, PMP dynamic memory allocation.