[Uim-bugs] [Bug 599] toolbar leaks memory on changing property list

bugzilla-daemon at pdx.freedesktop.org bugzilla-daemon at pdx.freedesktop.org
Wed May 5 13:21:11 EEST 2004


http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=599





------- Additional Comments From yusuke at cherubim.icw.co.jp  2004-05-05 20:21 -------
Following diff diminishes most of leak. However, there still some leaks remains.

--- helper-toolbar-common-gtk.c (revision 792)
+++ helper-toolbar-common-gtk.c (working copy)
@@ -88,7 +88,7 @@
 static void
 helper_applet_prop_list_update(gchar **tmp)
 {
-  GtkMenuShell *prop_menu = NULL; /* quiet gcc */
+  static GtkMenuShell *prop_menu = NULL; /* quiet gcc */
   GtkWidget *button;
   int i = 0;
   gchar **tmp2 = NULL;
@@ -137,6 +137,10 @@
          button = gtk_button_new_with_label(tmp2[1]);
          gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
          menu_buttons = g_list_append(menu_buttons, button);
+
+         if (prop_menu) {
+           gtk_widget_destroy(prop_menu);
+         }
           
          prop_menu = (GtkMenuShell*)gtk_menu_new();



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are on the CC list for the bug, or are watching someone who is.




More information about the uim-bugs mailing list