CustomerArray is dynamic array
CustomerArray = new dynamic array of 4 by 7 int
...
// Free the dynamic array
delete CustomerArray
Syntax
Delete <Name of Dynamic Object to Free>
<Name of Dynamic Object to Free>: Character string
Name of the dynamic object to free explicitly. This dynamic object can correspond to:
Remarks
Special case: the dynamic arrays
- A dynamic array is automatically freed at the end of the lifetime of the variable (when the window is closed for example) or when allocating new dimensions.
- If a dynamic array is declared and created in a single code line, Delete must not be used to explicitly delete the dynamic array. A runtime error will occur if Delete is used.
See Dynamic arrays for more details.
Special case: the dynamic automation objects
The dynamic automation object is automatically freed at the end of the process containing its declaration or during a new allocation of the object.
Versions 16 and laterSpecial case: the class objects and the dynamic class objects
To free an object, you also have the ability to use the following syntax:
New in version 16Special case: the class objects and the dynamic class objects
To free an object, you also have the ability to use the following syntax:
Special case: the class objects and the dynamic class objects
To free an object, you also have the ability to use the following syntax:
You can also:
- Free the memory space used by a matrix with MatDelete.
- Free the memory space occupied by a matrix used by a chart with grDeleteAll.