Sign in Join
FPDoc Onlineexperiment

TWinControl.Destroy destructor

Member of TWinControlpublicIn unit Controls

Destructor for the class instance.

Declaration

pascal
destructor Destroy; override

Description

Destroy is the overridden destructor for the class instance.

Destroy call RemoveFocus to ensure that the control cannot receive focus from a Parent control. If a handle has been allocated for the windowed control, the DestroyHandle method is called.

Destroy iterates over Controls to remove the value in the Parent property for each child control, and to remove an assigned HostDockSite. It does not actually free the child Controls; they are freed by the owner of the control instance (usually a TForm instance).

Destroy ensures that any controls in the DockClients property remove the current class instance from their host dock site.

Destroy frees resources allocated in the constructor, or in other class methods, including the DockManager and DockCients. Destroy calls the inherited destructor prior to exiting from the method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.