h1(#wxtreeitemdata). Wx::TreeItemData TreeItemData is some (arbitrary) user class associated with some item. The main advantage of having this class is that TreeItemData objects are destroyed automatically by the tree and, as this class has virtual destructor, it means that the memory and any other resources associated with a tree item will be automatically freed when it is deleted. Note that we don't use Object as the base class for TreeItemData because the size of this class is critical: in many applications, each tree leaf will have TreeItemData associated with it and the number of leaves may be quite big. Also please note that because the objects of this class are deleted by the tree using the operator @delete@, they must always be allocated on the heap using @new@. h2. Derived from "ClientData":clientdata.html h2. See also "TreeCtrl":treectrl.html