My Oracle Support Banner

Assigning Null to Variables in Siebel eScript (Doc ID 508828.1)

Last updated on OCTOBER 18, 2023

Applies to:

Siebel Tools, SPE - Version [16199] to 8.1.1 [21112] [Release V7 to V8]
z*OBSOLETE: Microsoft Windows 2000
**Relevance Check 21 Dec 2018 **


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");
          if (...)
               var myOtherBusObj = TheApplication().GetBusObject("bar");
     catch (e)
          // 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?


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.