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

# TCustomForm.Destroy

Destructor for the class instance.

## Declaration

Source position: forms.pp line 698

`public destructor TCustomForm.Destroy; override;`

## Description

Destroy is the overridden destructor for the class instance.

Destroy ensures that unhandled queued asynchronous calls in the Application instance are removed for the form.

Destroy disables auto-sizing to prevent resize messages while the form is being freed. Destroy frees resources allocated for the form instance, including its Icon and any allocated icon handles. The form instance is removed from Screen, and its ActionLists and SnapOptions are freed. Destroy frees all form handlers added to the class instance.

Destroy calls the inherited destructor prior to exiting from the method.

## See also

TCustomForm.Icon |  | The Icon associated with this Form (in minimized state).
Application |  | The TApplication singleton.
Screen |  | The TScreen singleton for the application.
TApplication |  | Application management and configuration for a GUI application.
TScreen |  | Provides information about screen displays in an application.