Ticket #14887 - wx.CallLater leaks if Python gc runs before Stop is called is Alive in 2.9.4?!?

Hi All,

It seems to me that ticket#14887 is not applied to the 2.9.4 version.

I’m using wxpython 2.9.4 & python 2.7.5 on windows XP/7

#example code from ticket#14887

import gc, wx, weakref

app = wx.App(redirect=False)

f = wx.Frame(None)

def cb():

print ‘in cb’, w()

wx.CallLater(100, cb2)

def cb2():

print ‘in cb2’, w()

app.Exit()

w = weakref.ref(wx.CallLater(100, cb))

gc.collect()

print gc.garbage

app.MainLoop()

#you will see in the end that gc.garbage is not empty!

Glazner wrote:

Hi All,

It seems to me that ticket#14887
<wxTrac has been migrated to GitHub Issues - wxWidgets; is not applied to the 2.9.4
version.
I'm using wxpython 2.9.4 & python 2.7.5 on windows XP/7

Well, that shouldn't be too surprising since 2.9.4 was released several months before that ticket was submitted. :wink:

It will be in 2.9.5 in a few days though.

···

--
Robin Dunn
Software Craftsman

Ooops, should have looked at the dates :stuck_out_tongue:
Thanks for the reply,
In the meantime the monkey patching works fine for me.

Thank!