Mercurial > pidgin.yaz
comparison gtk/gtkblist.c @ 14989:41ced1c9ba29
[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.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 17 Nov 2006 06:12:17 +0000 |
parents | cf25420b074d |
children | 8d3a5ff15f05 |
comparison
equal
deleted
inserted
replaced
14988:dc9ed6c44c48 | 14989:41ced1c9ba29 |
---|---|
5963 /* Clear the old Accounts menu */ | 5963 /* Clear the old Accounts menu */ |
5964 for (l = gtk_container_get_children(GTK_CONTAINER(accountmenu)); l; l = l->next) { | 5964 for (l = gtk_container_get_children(GTK_CONTAINER(accountmenu)); l; l = l->next) { |
5965 menuitem = l->data; | 5965 menuitem = l->data; |
5966 | 5966 |
5967 if (menuitem != gtk_item_factory_get_widget(gtkblist->ift, N_("/Accounts/Add\\/Edit"))) | 5967 if (menuitem != gtk_item_factory_get_widget(gtkblist->ift, N_("/Accounts/Add\\/Edit"))) |
5968 gtk_container_remove(GTK_CONTAINER(accountmenu), | 5968 gtk_widget_destroy(menuitem); |
5969 menuitem); | |
5970 } | 5969 } |
5971 | 5970 |
5972 for (accounts = gaim_accounts_get_all(); accounts; accounts = accounts->next) { | 5971 for (accounts = gaim_accounts_get_all(); accounts; accounts = accounts->next) { |
5973 char *buf = NULL; | 5972 char *buf = NULL; |
5974 GtkWidget *image = NULL; | 5973 GtkWidget *image = NULL; |