RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRIO.BeforeDestruction Method

Prevents the destruction of a TRIO instance if the reference count is greater than zero.

Pascal
procedure BeforeDestruction; override;
C++
virtual __fastcall BeforeDestruction();

BeforeDestruction is called automatically before the TRIO object's first destructor executes. Do not call it explicitly in your applications. 

TRIO overrides the BeforeDestruction method to check the RefCount property. If RefCount is greater than zero, then there is still an outstanding reference to the TRIO object's interface,. and BeforeDestruction raises an exception to prevent the destruction of this object. 

 

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