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

# TTreeNode.Destroy

Destructor for the class instance.

## Declaration

Source position: comctrls.pp line 3091

`public destructor TTreeNode.Destroy; override;`

## Description

Destroy is the overridden destructor for TTreeNode.

It notifies the owner ( the TTreeNodes container) that the tree node and its accessibility object are being deleted. The Unbind method is called to remove any references to the node in the parent and sibling nodes, or as a selection in TreeNodes.

Child nodes are removed by setting HasChildren to False. Child nodes in Items are freed, and its storage is set to Nil.

The Pointer in the Data property is set to Nil.

Destroy calls the inherited method prior to exit.

## See also

TPersistent.Destroy