RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInterfacedObject::BeforeDestruction Method

Checks that the reference count is zero before allowing the interfaced object to be destroyed.

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

System::TInterfacedObject::BeforeDestruction is called automatically immediately before the interfaced object's destructor. It checks that the reference count is zero, and, if it is not, raises an exception. 

 

System::TInterfacedObject::RefCount 

System::TObject::free

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!