[Overview][Classes][Index] | Reference for unit 'CustomTimer' (#lcl)

# TCustomTimer.Destroy

Destructor for the timer class instance.

## Declaration

Source position: customtimer.pas line 50

`public destructor TCustomTimer.Destroy; override;`

## Description

Destroy is the overridden destructor for the class instance. Destroy ensures that the OnTimer event handler is unassigned and Enabled is set to False before halting the timer by calling the KillTimer method.

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

Use the OnStopTimer event handler to perform actions needed when the timer is disabled or freed.

## See also

TCustomTimer.Enabled |  | Indicates if the timer is ready to start.
TCustomTimer.OnTimer |  | Event handler signalled when the Interval for the timer has elapsed.
TCustomTimer.KillTimer |  | Stops execution of the timer class instance.
TCustomTimer.OnStopTimer |  | OnStopTimer - event handler for stopping the timer.
TComponent.Destroy