Releasecomobject - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ReleaseComObject

Description
Releases a COM Object and frees up resources that it used.
Returns
Nothing.
Category
Extensibility functions
Function syntax
ReleaseComObject(objectName)
See also
CreateObject,
History
ColdFusion MX 6.1: Added this function.
Parameters
Parameter
objectName
Usage
This function forcefully terminates and releases the specified COM object and all COM objects
that it created. Use this function when the object is no longer in use, to quickly free up resources.
If the COM object has a method, such as a
method before you call the
This function can improve processing efficiency, but is not required for an application to work. If
you do not use this function, the Java garbage collection mechanism eventually frees the
resources. If you use this function on an object that is in use, the object is prematurely released
and your application will get exceptions.
Example
<h3>ReleaseComObject Example</h3>
<cfscript>
obj = CreateObject("Com", "excel.application.9");
//code that uses the object goes here
obj.quit();
ReleaseObject(obj);
</cfscript>
cfobject
Description
Variable name of a COM object that was created using the
or
tag.
cfobject
ReleaseComObject
method, that terminates the program, call this
quit
function.
function
CreateObject
ReleaseComObject
657

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents