diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-07-20 17:10:24 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-20 17:10:24 +0000 |
commit | 82877f9ee919f8a19060a219bfe5f94d8fa17f94 (patch) | |
tree | 8785e46f2285c242a12e3ba57b0424881a1ae6d0 /tests/testmerge.c | |
parent | 9aeba99da095f26ba535e4b2fb0797943309a851 (diff) | |
download | gtk+-82877f9ee919f8a19060a219bfe5f94d8fa17f94.tar.gz |
Add some refcount debugging.
2004-07-20 Matthias Clasen <mclasen@redhat.com>
* tests/testactions.c (main):
* tests/testmerge.c (main): Add some refcount debugging.
* gtk/gtkuimanager.c (update_node, free_node): Ref an sink
all proxies, so that we can properly clean up floating proxies
which the app didn't adopt. (#147926, Tommi Komulainen)
Diffstat (limited to 'tests/testmerge.c')
-rw-r--r-- | tests/testmerge.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/tests/testmerge.c b/tests/testmerge.c index 05bbf3133b..dff451a648 100644 --- a/tests/testmerge.c +++ b/tests/testmerge.c @@ -88,7 +88,6 @@ delayed_toggle_dynamic (GtkUIManager *merge) "label", "Dynamic action 2", "stock_id", GTK_STOCK_EXECUTE, NULL); - g_object_set (dyn, "name", "dyn2", NULL); gtk_action_group_add_action (dynamic, dyn); } @@ -690,8 +689,41 @@ main (int argc, char **argv) gtk_widget_show_all (window); gtk_main (); - g_object_unref (action_group); +#ifdef DEBUG_UI_MANAGER + { + GList *action; + + g_print ("\n> before unreffing the ui manager <\n"); + for (action = gtk_action_group_list_actions (action_group); + action; + action = action->next) + { + GtkAction *a = action->data; + g_print (" action %s ref count %d\n", + gtk_action_get_name (a), G_OBJECT (a)->ref_count); + } + } +#endif + g_object_unref (merge); +#ifdef DEBUG_UI_MANAGER + { + GList *action; + + g_print ("\n> after unreffing the ui manager <\n"); + for (action = gtk_action_group_list_actions (action_group); + action; + action = action->next) + { + GtkAction *a = action->data; + g_print (" action %s ref count %d\n", + gtk_action_get_name (a), G_OBJECT (a)->ref_count); + } + } +#endif + + g_object_unref (action_group); + return 0; } |