Rix memory leak in toolitem.py
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 10 Sep 2009 08:40:59 +0000 (16:40 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 10 Sep 2009 08:41:46 +0000 (16:41 +0800)
ui/gtk/toolitem.py

index 5ea4bf0fb55237b257a7257ee16783ea5ed3fcf9..02f57bc9452055249b466d828927ecbacce50c14 100644 (file)
@@ -170,4 +170,7 @@ class MenuToolButton(ToggleToolButton):
         if self.get_active():
             self._menu.popup(0, gtk.get_current_event_time(), self)
 
-
+    def destroy(self):
+        self._menu.destroy()
+        self._menu = None
+        super(MenuToolButton, self).destroy()