CGrid:delete


The delete method deletes an instance of the CGrid class. However, it does not delete the grid window that was attached to the CGrid object as the window belongs to the Mira user interface. Call delete when you are finished using the instance of this class in order to free memory associated with the CGrid itself. Mira automatically deletes all class objects when the script finishes but, it usually is good practice to delete objects when you are finished with them, at least so that you can re use the name.

Syntax

CGrid:delete()

Example

The following script shows the creation and deletion of a CGrid object. You also could just allow the grid to self-delete when the script finishes:

G = CGrid:new()

-- create a new instance of of the CGrid class.

  --

-- do something with the CGrid.

G:delete()

-- delete the object and its associated memory.

Related Topics

new

CGrid class