You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Releases a previously instantiated COM object from memory.

Syntax

Result = SRP_Com(Object, "RELEASE")

Returns

1 if the object was released successfully, 0 if there was an error.

Remarks

The RELEASE service removes an instantiated object from memory. When you use the CREATE service to create objects, they are loaded into memory and remain there until you either release the object using the RELEASE service or until OI closes down. Don't worry if you forget to call this service; SRP_Com will clean up whatever is left.

That being said, if you plan to instantiate a lot of objects, leaving them in memory over a long period of time can degrade performance.

Example

 

// Instantiate the MSXML DOM Document object
If SRP_Com(objXmlDoc, "CREATE", "Msxml2.DOMDocument") then
    // Release the object when we're done with it
    SRP_Com(objXmlDoc, "RELEASE")
end else
    Error = SRP_Com("", "ERROR")
end

 

 

  • No labels