System.TInterfacedObject.BeforeDestruction
Delphi
procedure BeforeDestruction; override;
C++
virtual void __fastcall BeforeDestruction();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.pas systobj.h |
System | TInterfacedObject |
Description
Checks that the reference count is zero before allowing the interfaced object to be destroyed.
BeforeDestruction is called automatically immediately before the interfaced object's destructor. It checks whether the reference count is zero, and, if it is not, raises an exception.