Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> from wxPython import wx
>>> sys.getrefcount(wx.wxPySizer())
2
>>> ^Z
14:29:33: There were memory leaks.
14:29:33: ----- Memory dump -----
14:29:33: wxPySizer at $13E8218, size 76
14:29:33:
14:29:33: ----- Memory statistics -----
14:29:33: 1 objects of class wxPySizer, total size 76
14:29:33:
14:29:33: Number of object items: 1
14:29:33: Number of non-object items: 0
14:29:33: Total allocated size: 76
14:29:33:
this is for wxPython 2.3.0 and wxPython 2.3.2 (except size is 88)
Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> from wxPython import wx
>>> sys.getrefcount(wx.wxPySizer())
2
>>> ^Z
14:29:33: There were memory leaks.
14:29:33: ----- Memory dump -----
14:29:33: wxPySizer at $13E8218, size 76
14:29:33:
14:29:33:
14:29:33: ----- Memory statistics -----
14:29:33: 1 objects of class wxPySizer, total size 76
14:29:33:
14:29:33: Number of object items: 1
14:29:33: Number of non-object items: 0
14:29:33: Total allocated size: 76
14:29:33:
14:29:33:
Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
import sys
from wxPython.wx import *
s = wxPySizer()
sys.getrefcount(s)
4
s.Destroy()
^Z
Since the sizer is not assigned to a window then you need to clean it up
yourself, that's what the Destroy method is for. If it had been assigned to
a window then the window would take ownership and would destroy it when the
window is destroyed.
ยทยทยท
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!