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

# TCustomForm.BeforeDestruction

Performs actions before the form instance is physically freed.

## Declaration

Source position: forms.pp line 702

`public procedure TCustomForm.BeforeDestruction; override;`

## Description

Calls the inherited method on entry to signal any OnBeforeDestruction event handlers assigned to the form instance.

Removes the form instance from the list of focused forms in the Screen singleton. At run-time, the Hide method is called when the form is not a MDI child form in the application. If the form is a MDI child form, merged menu items are removed from the menu in the MainForm for the Application.

## See also

TControl.BeforeDestruction |  | Performs notifications before the control is destroyed.