Stop the timer when the sample is destroyed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-24 01:33:28 +00:00
parent 01732ba144
commit 55f834ca0e

View File

@@ -18,6 +18,9 @@ class TestPanel(wx.Panel):
self.timer = wx.Timer(self)
self.timer.Start(100)
def __del__(self):
self.timer.Stop()
def TimerHandler(self, event):
self.count = self.count + 1
@@ -28,7 +31,6 @@ class TestPanel(wx.Panel):
self.g2.Pulse()
#----------------------------------------------------------------------
def runTest(frame, nb, log):