ZBasic System Library
The address of the block to free.
This subroutine returns a block of allocated memory to the heap so that it may be later re-used. The
addr parameter must be the value returned by an earlier call to System.Alloc() that has not yet been
freed. Invoking this subroutine with addr equal to 0 is a special case that is benign.
This function and its companion, System.Alloc(), must be used with great care. If System.Free()
is called with a non-zero value that is not one returned by System.Alloc() or a value that has already
been freed, the heap management data structures will almost certainly be corrupted and future
allocations will likely fail. It is a good practice to set an address to zero after it has been freed as
illustrated in the example below.
Dim addr as UnsignedInteger
addr = System.Alloc(50)
[other code here that uses the allocated block]
addr = 0
This routine is not available in BasicX compatibility mode.