Clear class variables

Command group Flag affected Reversible Execute on client Platform(s)
Parameters and variables NO NO NO All

Syntax

Clear class variables

Description

This command clears any class variables used within the class and clears the memory used for the class variables. Clear class variables is placed in a method within the class where you want to clear variables.

A class variable is initialized to empty or its initial value the first time it is referenced. It remains allocated until the class variables for its class are cleared. The class variables for all classes are cleared when the library file is closed.

Example

; Transfer values from class variables to instance
; variables and clear the class variables
Calculate cVar1 as 'my class Var1'
Calculate cVar2 as 'my class Var2'
Calculate cVar3 as 'my class Var3'
Calculate iVar1 as cVar1
Calculate iVar2 as cVar2
Calculate iVar3 as cVar3
Clear class variables ;; all class variables are now empty