Wednesday, December 05, 2007

wxPython - Cleanup resources OnDestroy

Within your __init Method

self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)


Then add OnDestroy:


def OnDestroy(self, event):
## clean up resources as needed here
event.Skip()