free

Definition: free(object addr)
Description: Free up a previously allocated block of memory by specifying the address of the start of the block, i.e. the address that was returned by allocate(). The addr parameter can also be a sequence of such atoms, which are released in turn.
Comments: Use free() to recycle blocks of memory during execution. This reduces the chance of running out of memory or getting into excessive virtual memory swapping to disk. Do not reference a block of memory that has been freed, in some cases it may help to deliberately zero the variable passed to the addr parameter immediately after free() returns.

When a program terminates, all allocated memory is returned to the system. Strictly speaking it is not necessary to release "one-off" allocations, and many legacy programs will not, however they will appear in the final report should memory leak checking be enabled (see technicalia dropdown).
Example Program: demo\dos32\callmach.ex
See Also: allocate