AfterConstruction and BeforeDestruction
Go Up to C++ and Delphi Class Models
System.TObject introduces two virtual methods, BeforeDestruction and AfterConstruction, that allow programmers to write code that is processed before and after objects are destroyed and created, respectively.
- BeforeDestruction is called before the first destructor is called.
- AfterConstruction is called after the last constructor is called.
These methods are public and are called automatically.