DISPOSE

Releases memory occupied by user-defined variables (including form fields and menu items) or result sets.

Syntax

DISPOSE option

Parameters

option

Can be
«item »
The name of a variable, form field, menu item, form, or menu whose current memory allocation is to be released.
ALL
Releases the current memory allocation of all user-defined variables, form fields, and menu items.
SET
Causes all result sets to be reset to empty.

Comments

DISPOSE releases the memory where the current values of variables (including form fields and menu items) are stored. As a result, the objects whose values were stored in that memory become $Null. DISPOSE does not close or erase the objects themselves.

Example

dispose all

Releases memory used to store current values of all variables, form fields, and menu items in an application.

dispose Form1 Menu1

Releases the memory used to store the current values of all form fields in the specified form and menu.

 

Related Topics