The dispose procedure


The dispose procedure destroys an identified variable (associated with a pointer variable), or all of the selected variables (associated with a list variable), or an instance variable (associated with an object variable).

The dispose procedure will store an undefined value into the pointer variable, or the list variable, or the object variable.


The dispose procedure's only parameter is a reference to a pointer variable, or a list variable, or a object variable. It is an error if the variable referenced by the parameter contains the special value nil or is undefined.


Operating Systems: All
Standard Pascal: Yes

In Standard Pascal, the dispose procedure's parameter is an expression of pointer type, and not a reference to a pointer variable as required by Irie Pascal.

Standard Pascal does not support list types or object types and so does not support using the dispose procedure on variables of those types.