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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user