[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'System' (#rtl)

# TObject.BeforeDestruction

Method called before the destructor is called.

## Declaration

Source position: objpash.inc line 233

`public procedure TObject.BeforeDestruction; virtual;`

## Description

BeforeDestruction is a method called before the destructor is called. It does nothing in the implementation of TObject and must be overridden by descendent classes to provide specific behaviour that is executed before the destructor has finished executing. (for instance, call an event handler)

## Errors

None.

## See also

AfterConstruction |  | Method called after the constructor was called.
Destroy |  | TObject destructor.
Free |  | Check for Nil and call destructor.

Documentation generated on: May 14 2021