Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]


Destructor for the class instance.


Source position: controls.pp line 2376

public destructor TWinControl.Destroy; override;


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



The control within which the control is shown.



Provides indexed access to the child controls for the class instance.



Removes the specified control from the Controls property.



The docking layout manager for this control.



The indexed list of controls docked into this control.



The host site (TWinControl) into which this control is docked. Nil if not docked.

CT Web help

CodeTyphon Studio