AdobeStock_455007340

New ReleaseComObject() Function

This one slipped under the radar for lots of folks, but if you are using COM objects from within CFML code then it is important. CFMX 6.1 added a new function named ReleaseComObject(), which does exactly what its name suggests. In the past ColdFusion did its own cleanup (eventually) and this caused problems for some developers who sometimes needed to explicitly terminate and release a COM object (often so as to use it again). Using ReleaseComObject() you can explicitly terminate and release COM objects when needed.

4 responses to “New ReleaseComObject() Function”

  1. Steven Erat Avatar
    Steven Erat

    There is a misprint in the local electronic documentation. The example uses ReleaseObject rather than ReleaseComObject.

  2. Ben Forta Avatar
    Ben Forta

    Yep, was going to note that in the live docs but someone beat me to it. 🙂

  3. Steve Sommers Avatar
    Steve Sommers

    I think I know the answer but any chance this function will migrate into older version of CF, particularily CF5?

  4. Ben Forta Avatar
    Ben Forta

    Steve, nope, sorry.

Leave a Reply