System.TObject.BeforeDestruction
Delphi Information
From System.pas
procedure BeforeDestruction virtual;
Unit: System
Type: method
Visibility: public
Member Of: TObject
C++ Information
From System.hpp
virtual void __fastcall BeforeDestruction(void);
Unit: System
Type: method
Visibility: public
Member Of: TObject
Description
Responds before the first destructor executes.
BeforeDestruction is called automatically before the object's first destructor executes. Do not call it explicitly in your applications.
The BeforeDestruction method implemented in TObject does nothing. Override this method when creating a class that performs an action before the object is destroyed. For example, TCustomForm overrides BeforeDestruction to generate an OnDestroy event.
Note: BeforeDestruction is not called when the object is destroyed before it is fully constructed. That is, if the object's constructor raises an exception, the destructor is called to dispose of the object, but BeforeDestruction is not called.