RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComObject.Destroy Destructor

Disposes of an instance of a COM object.

Pascal
destructor Destroy; override;
C++
virtual __fastcall ~TComObject();

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the COM object is not nil before it calls Destroy. 

Destroy checks to see if the Factory property is nil. If it is nil, then Destroy passes False to the CountObject method of the Factory object's ComServer, allowing the DLL (server) to be unloaded if no more objects are dependent upon the server. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!