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

# TCustomForm.OnDestroy

Handler called when the form is destroyed.

## Declaration

Source position: forms.pp line 805

`public property TCustomForm.OnDestroy : TNotifyEvent read FOnDestroy write FOnDestroy;`

## Description

OnDestroy is a TNotifyEvent property signalled when the form instance is destroyed. OnDestroy is signalled from the DoDestroy method (when assigned) as one of the steps before destruction of the class instance. Before the event handler is triggered, the form has been hidden and the Menu from the main form in the Application has been unmerged.