Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using IDL / Destroying IDLcomIDispatch Objects

IDL

Destroying IDLcomIDispatch Objects

Destroying IDLcomIDispatch Objects

Use the OBJ_DESTROY procedure to destroy and IDLcomIDispatch object.

When OBJ_DESTROY is called with an IDLcomIDispatch object as an argument, the underlying reference to the COM object is released and IDL resources relating to that object are freed.

Note: Destroying an IDLcomIDispatch object does not automatically cause the destruction of the underlying COM object. COM employs a reference-counting methodology and expects the COM object to destroy itself when there are no remaining references. When an IDLcomIDispatch object is destroyed, IDL simply decrements the reference count on the underlying COM object.

Note: IDL does not automatically destroy an object when the object variable goes out of scope (e.g., when a procedure returns). If the IDLcomIDispatch object is not explicitly destroyed, the COM reference count is not decremented, which could keep the object instantiated and never released.



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us