[gaim-migrate @ 17767]

Fri, 17 Nov 2006 06:12:17 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Fri, 17 Nov 2006 06:12:17 +0000
changeset 15050
f99d78ac44e9
parent 15049
d8749c39e1e4
child 15051
1d0c9b4b68e6

[gaim-migrate @ 17767]
Ari Pollak traced down a memory leak to the account menuitems not being cleaned up by gtk_container_remove().
It turns out that there is an additional reference somewhere which is preventing the menuitem from being destroyed - deryni tracked it down to gtk_accel_label_set_accel_widget() in gtk_image_menu_item_new_with_label() - we will be reporting the bug to the GTK folks tomorrow.
This fixes the leakage; gtk_widget_destroy() is what really should be used in this situation anyway.

gtk/gtkblist.c file | annotate | diff | comparison | revisions
--- a/gtk/gtkblist.c	Fri Nov 17 04:31:21 2006 +0000
+++ b/gtk/gtkblist.c	Fri Nov 17 06:12:17 2006 +0000
@@ -5965,8 +5965,7 @@
 		menuitem = l->data;
 
 		if (menuitem != gtk_item_factory_get_widget(gtkblist->ift, N_("/Accounts/Add\\/Edit")))
-			gtk_container_remove(GTK_CONTAINER(accountmenu),
-			                     menuitem);
+			gtk_widget_destroy(menuitem);
 	}
 
 	for (accounts = gaim_accounts_get_all(); accounts; accounts = accounts->next) {

mercurial