CMatrix:Empty
The Empty method deletes all members of the matrix but does not delete the CMatrix object.
| 
 CMatrix:Empty()  | 
This deletes all matrix members without deleting the CMatrix object itself. If you delete the CMatrix, the object is set to nil and cannot be used again without creating a new instance using new. By calling Empty, the existing CMatrix can be used to Set new members, and so forth.
The following script sets 3 members in a new CMatrix M, then deletes all members of M:
| 
 | 
 -- create a CMatrix  | 
| 
 | 
 -- set member  | 
| 
 | 
 -- set member  | 
| 
 | 
 -- set member  | 
| 
 | 
 -- result: Members = 3  | 
| 
 | 
 -- empty the matrix  | 
| 
 | 
 -- result: Members = 0  | 
| 
 | 
 -- if finished with M, clean up memory  | 
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.