From: Vadim Zeitlin Date: Wed, 25 Oct 2006 00:03:41 +0000 (+0000) Subject: add a note explaining that sizers should be heap-allocated (bug 965825) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c1073b57a77ee0d022368d6a45fccd427283a512 add a note explaining that sizers should be heap-allocated (bug 965825) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex index b3442af356..73979305da 100644 --- a/docs/latex/wx/sizer.tex +++ b/docs/latex/wx/sizer.tex @@ -31,6 +31,12 @@ add empty space of the desired size and attributes, and then use the wxSizerItem method to determine where the drawing operations should take place. +Please notice that sizers, like child windows, are owned by the library and +will be deleted by it which implies that they must be allocated on the heap. +However if you create a sizer and do not add it to another sizer or window, the +library wouldn't be able to delete such an orphan sizer and in this, and only +this, case it should be deleted explicitly. + \pythonnote{If you wish to create a sizer class in wxPython you should derive the class from {\tt wxPySizer} in order to get Python-aware capabilities for the various virtual methods.}