From 1ac335f2718b26d01fbb2ecca82a2f81c97446f3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 13 Sep 2008 13:23:49 +0200 Subject: [PATCH] Break the reference cycle between menu and palette. #8469 --- src/sugar/graphics/palette.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index 8201cf86..0b7a2689 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -279,6 +279,10 @@ class Palette(gtk.Window): def __destroy_cb(self, palette): self.set_group_id(None) + + # Break the reference cycle. It looks like the gc is not able to free + # it, possibly because gtk.Menu memory handling is very special. + self.menu = None def _add_menu(self): self._menu_box = gtk.VBox()