Browse Source

messenger hook cleanup

Darren Ranalli 19 years ago
parent
commit
e37af2fe40

+ 6 - 0
direct/src/gui/DirectScrollBar.py

@@ -123,6 +123,12 @@ class DirectScrollBar(DirectFrame):
         self.guiItem.setResizeThumb(self['resizeThumb'])
 
     def destroy(self):
+        self.thumb.destroy()
+        del self.thumb
+        self.incButton.destroy()
+        del self.incButton
+        self.decButton.destroy()
+        del self.decButton
         DirectFrame.destroy(self)
 
     def commandFunc(self):

+ 4 - 0
direct/src/gui/DirectScrolledFrame.py

@@ -93,5 +93,9 @@ class DirectScrolledFrame(DirectFrame):
         for child in self.canvas.getChildrenAsList():
             childGui = self.guiDict.get(child.getName())
             if childGui: childGui.destroy()
+        self.verticalScroll.destroy()
+        self.horizontalScroll.destroy()
+        del self.verticalScroll
+        del self.horizontalScroll
         DirectFrame.destroy(self)
 

+ 2 - 0
direct/src/gui/DirectSlider.py

@@ -114,6 +114,8 @@ class DirectSlider(DirectFrame):
             raise ValueError, 'Invalid value for orientation: %s' % (self['orientation'])
 
     def destroy(self):
+        self.thumb.destroy() # ow!
+        del self.thumb
         DirectFrame.destroy(self)
 
     def commandFunc(self):