]> git.saurik.com Git - wxWidgets.git/commitdiff
Stop the timer when the sample is destroyed
authorRobin Dunn <robin@alldunn.com>
Tue, 24 Oct 2006 01:33:28 +0000 (01:33 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 24 Oct 2006 01:33:28 +0000 (01:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Gauge.py

index 35ad5f94ae9980aa7db73d7beb0009776ae0c313..d53bcdbf3324ded5df150c42892786aa3a1a2099 100644 (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):