Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Don't leak references in the actions example
Browse files Browse the repository at this point in the history
These are not initially unowned...
  • Loading branch information
Matthias Clasen committed Nov 1, 2010
1 parent 0942663 commit cb8d29a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gio/tests/gapplication-example-actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ add_actions (GApplication *app)
action = g_simple_action_new ("simple-action", NULL);
g_signal_connect (action, "activate", G_CALLBACK (activate_action), app);
g_simple_action_group_insert (actions, G_ACTION (action));
g_object_unref (action);

action = g_simple_action_new_stateful ("toggle-action", NULL,
g_variant_new_boolean (FALSE));
g_signal_connect (action, "activate", G_CALLBACK (activate_toggle_action), app);
g_simple_action_group_insert (actions, G_ACTION (action));
g_object_unref (action);

g_application_set_action_group (app, G_ACTION_GROUP (actions));
g_object_unref (actions);
}

int
Expand Down

0 comments on commit cb8d29a

Please sign in to comment.