base class of wxTreeItemData corrected

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-02-04 12:21:08 +00:00
parent 48850fa74d
commit 1e3996b1bd

View File

@@ -1,20 +1,21 @@
\section{\class{wxTreeItemData}}\label{wxtreeitemdata} \section{\class{wxTreeItemData}}\label{wxtreeitemdata}
wxTreeItemData is some (arbitrary) user class associated with some item. The wxTreeItemData is some (arbitrary) user class associated with some item. The
main advantage of having this class (compared to the old untyped interface) is main advantage of having this class is that wxTreeItemData objects are
that wxTreeItemData's are destroyed automatically by the tree and, as this destroyed automatically by the tree and, as this class has virtual destructor,
class has virtual dtor, it means that the memory will be automatically it means that the memory and any other resources associated with a tree item
freed. We don't just use wxObject instead of wxTreeItemData because will be automatically freed when it is deleted. Note that we don't use wxObject
the size of this class is critical: in any real application, each tree leaf as the base class for wxTreeItemData because the size of this class is
will have wxTreeItemData associated with it and number of leaves may be critical: in many applications, each tree leaf will have wxTreeItemData
quite big. associated with it and number of leaves may be quite big.
Because the objects of this class are deleted by the tree, they should Also please note that because the objects of this class are deleted by the tree
always be allocated on the heap. using the operator {\tt delete}, they must always be allocated on the heap
using {\tt new}.
\wxheading{Derived from} \wxheading{Derived from}
wxTreeItemId wxClientData
\wxheading{Include files} \wxheading{Include files}