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

# TApplication.OnDestroy

Event handler signalled when the application is freed.

## Declaration

Source position: forms.pp line 1768

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

## Description

OnDestroy is signalled from the Destroy destructor prior to freeing resources allocated in the application class instance. It provides the first opportunity to respond to application shutdown after Flags has been updated to include the AppDestroying enumeration value.

## See also

TApplication.Destroy |  | Destructor for the class instance.
TApplication.Flags |  | Contains state flags for the application.
TApplicationFlags |  | Set type used to store values from the TApplicationFlag enumeration.