Assigning Null to Variables in Siebel eScript
Last updated on JULY 12, 2017
Applies to:Siebel Tools, SPE - Version 22.214.171.124  to 8.1.1  [Release V7 to V8]
z*OBSOLETE: Microsoft Windows 2000
Questions about assigning null to variables within eScript code.
1) Within eScript, Siebel recommends explicitely releasing the memory used by Siebel objects by setting the variables to null within a finally block. Besides Siebel objects, are there any other types of objects that should be set to null? For example, what about objects created with the new statement?
var myArray = new Array();
var myDate = new Date();
// any other object types?
2) In order for a variable to be referenced inside of a finally block, is it required for the variable to be declared before the try block, or can it be declared within the try block without any risk of not having all of the null statements work properly.
// The variables are declared inside the try block
var myBusObj = TheApplication().GetBusObject("foo");
var myOtherBusObj = TheApplication().GetBusObject("bar");
// Is there any possibility that these statements won't work because
// the variables might not be in scope for this block?
myBusObj = null;
myOtherBusObj = null;
3) If the return value from the property set GetChild() method is set to a variable, should this variable also be set to null? Or is only setting the parent property set variable to null sufficient to release all memory.
4) Before setting a variable to null that references a property set, is it necessary to call the Reset() method to clear the property set, or is simply setting the variable to null sufficient to release all memory?
5) Would the following statement cause a memory problem because the business object is not set to a variable and therefore not set to null?
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms