|
|
|
|
|
- Special case: the dynamic arrays
- Special case: the dynamic automation objects
- Special case: the class objects and the dynamic class objects
- Freeing the memory space
Delete (Reserved word) In french: Libérer
The memory occupied by a dynamic object (array, class object, ...) is automatically freed when the object is no longer used or when closing the element (window, report, ...) in which the dynamic object was declared. Delete is used to explicitly free the memory occupied by: The use of Delete is optional. Delete allows the developer to quickly free the available memory space. 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 line of code, Delete must not be used to explicitly delete the dynamic array. A runtime error will occur if Delete is used.
For more details, see Dynamic arrays.
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. 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|