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

# TWidgetSet.BeforeDestruction

Performs actions needed before freeing the class instance.

## Declaration

Source position: interfacebase.pp line 133

`public procedure TWidgetSet.BeforeDestruction; override;`

## Description

BeforeDestruction is an overridden method used to perform actions needed prior to freeing the class instance. BeforeDestruction ensures that resources allocated for the ThemeServices property are freed and nil'd. BeforeDestruction calls the inherited method prior to exit.

## See also

TWidgetSet.ThemeServices |  | Theme services class instance for the widgetset.
TObject