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

TCustomControl.Destroy

Destructor for the class instance.

Declaration

Source position: controls.pp line 2492

public destructor TCustomControl.Destroy; override;

Description

Destroy is the overridden destructor for the class instance.

It calls RemoveFocus to prevent the Parent control from giving focus to the free control. It destroys the Handle for the control, and ensures that the control is removed as a Parent or DockSite for its child controls. It does not free the child controls; they are freed by their owner.

Controls in the DockClient property are updated to remove the class instance from the HostDockSite property in the docking clients.

Destroy frees resource allocated in the constructor, and calls the inherited method prior to exit.

See also

TCustomControl.Canvas

  

The drawing surface for the control.


Version 3.2 Generated 2024-02-25 Home