[wxPython] wxDC

There seems to be a problem with wxDC. It seems te be the source of a
memory leek in my program (http://www.dis.uu.se/~pi/python). After a
while the memory use of the program has risen from about 19MB to almost
10 times that.

Here is a little test program that displays this behaviour (although
this one doesn't lose memory as fast).

#!/usr/bin/env python
from wxPython.wx import *

class Timer(wxTimer):
    def __init__(self,parent):
        wxTimer.__init__(self)
        self.parent=parent
        self.Start(500)

    def Notify(self):
        #pass
        dc=wxClientDC(self.parent)
        
class MyFrame(wxFrame):
    def __init__(self,parent):
        wxFrame.__init__(self,parent,-1,"",size=(800,600))

        EVT_CLOSE(self,self.OnCloseWindow)

        t=Timer(self)

    def OnCloseWindow(self,evt):
        self.Destroy()
        return true

class MyApp(wxApp):
    def OnInit(self):
        frame=MyFrame(None)

        frame.Show(true)
        return true

app=MyApp(0)
app.MainLoop()

If I use the "pass" line instead of the line below it, memory use is
stable. I have tried it on both Solaris SPARC and x86.

Any ideas?

···

--
  Pierre Hj?lm, Systems Administrator
  Department of Information Science, Uppsala University, Sweden
  email:pierre.hjalm@dis.uu.se phone:+46-(0)18-4711044 fax:+46-(0)18-554422
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

There seems to be a problem with wxDC. It seems te be the source of a
memory leek in my program (http://www.dis.uu.se/~pi/python). After a
while the memory use of the program has risen from about 19MB to almost
10 times that.

Here is a little test program that displays this behaviour (although
this one doesn't lose memory as fast).

I've tried your test on MSW and Linux, with no apparent growth in the
process size. Maybe it's something specific to Solaris? I'll try it there
as soon as I can.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users