allTransientInstances
allTransientInstances(objArray: ObjectArray; maxInsts: Integer);
The allTransientInstances method of the Process class populates the array specified in the objArray parameter with all non-shared transient instances that have been created by the receiver process and not yet deleted. This includes instances of internal classes such as NumberFormat and Printer but does not include shared transient instances. Use this method to check for transient objects that have not been deleted when an application terminates.
The maxInsts parameter specifies the maximum number of transient instances. A maxInsts parameter value of zero (0) indicates that there is no maximum number of transient instances.
You can use the allTransientInstances method only a Process instance passed by the current process. If this method is called with a foreign process as the receiver, an exception is raised (that is, a 1265 -
Do not use the allTransientInstances method in
If executed from a clientExecution method called from a serverExecution method, it will not include any transient objects that were created in the serverExecution method and not yet accessed by the clientExecution methods.
The code fragment in the following example shows the use of the allTransientInstances method.
create objectArray transient; process.allTransientInstances(objectArray, 0); write 'Transient instances are -'; foreach object in objectArray do write object.String; endforeach; delete objectArray;