Vcl.WinXPanels.TCustomCardPanel.Destroy

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

destructor Destroy; override;

C++

__fastcall virtual ~TCustomCardPanel();

Properties

Type Visibility Source Unit Parent
destructor public
Vcl.WinXPanels.pas
Vcl.WinXPanels.hpp
Vcl.WinXPanels TCustomCardPanel

Description

Destroys an instance of TCustomControl.

Vcl.WinXPanels.TCustomCardPanel.Destroy inherits from Vcl.Controls.TCustomControl.Destroy. All content below this line refers to Vcl.Controls.TCustomControl.Destroy.

Destroys an instance of TCustomControl.

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the control is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it destroys the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendent control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.

See Also