DISPOSE - return a variable to free storage.

Usage:

procedure dispose( var pointer^ ); <pre-declared>;
var ptr: type^;
...
dispose( ptr [, constant1, constant2, ... ] );

Description:

DISPOSE deallocates a variable of type "type" pointed to by "ptr" and returns the space to the free storage pool.

Upon return, the pointer supplied as an argument is set to NIL, but the programmer is responsible for ensuring that any other copies of the pointer are not used again.

An error message and abort occurs if the pointer is NIL or if the space to be deallocated is already wholly or partially on the free storage list.

The only way to reuse space is to explicitly deallocate it with DISPOSE. Since the GCOS-8 implementation has no "garbage collector", a program must not assume that storage will be recovered if all pointers to it have been dropped.

If any of the optional constant arguments are supplied, the constants should be the same as those in the corresponding call to NEW.

Copyright © 1996, Thinkage Ltd.