Siebel VB Language Reference > VB Language Reference >
This standard VB function removes an instantiated object from memory.
Set objectName = Nothing
The name of the object variable to set to Nothing
Nothing is the value object variables have when they do not refer to an object, either because they have not been initialized yet or because they were explicitly set to Nothing. For example:
If Not objectVar
Is Nothing then objectVar
Use the Nothing function to remove an object that you have instantiated from memory.
This example adds an activity record indicating that a contact has been added when a new contact is added in the Siebel application. It presumes that Contact is the parent business component and instantiates the Action business component, destroying it using the Nothing statement after the job is done. For other examples of the Nothing function, read CreateObject Function and GetObject Function.
Dim oBCact as BusComp
Set oBCact = theApplication.ActiveBusObject.GetBusComp("Action")
.SetFieldValue "Type", "Event"
.SetFieldValue "Description", "ADDED THRU SVB"
.SetFieldValue "Done", Format(Now(),"mm/dd/yyyy hh:mm:ss")
.SetFieldValue "Status", "Done"
set oBCact = Nothing