PSL dynamically allocates objects memory for objects when they are instantiated by either by calling methods that return objects or by calling the Class.new() method. The length of time that the object is stored is based on the program’s logic, not on the duration of a procedure call or boundaries of a block.
The life of an object begins when it is created and ends when the object is no longer needed. When no references to an object exist, the memory associated with the storage of that object is deallocated. In this manner, PSL automatically deallocates memory.
For example, if you use the PSL type command to create an object within a procedure or nested block, PSL allocates memory as needed for the object when the system processes the type command. PSL de-allocates the memory for the object when processing exits the procedure.
Example
type RecordDEP dep=Class.new("RecordDEP")
do something....
quit //Deallocates the identifier dep and the allocation for its properties