aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-14 22:42:06 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-03-14 22:42:06 -0500
commitfb36c642ce787c2ba2c9ec076250b12dac8c0546 (patch)
tree8c6eb56380d7c667510467fddce6a8ded62c3f7a /src
parent61b00f51d58678c0a265c9e4a0fd35354fe5dc90 (diff)
downloadayatana-indicator-datetime-fb36c642ce787c2ba2c9ec076250b12dac8c0546.tar.gz
ayatana-indicator-datetime-fb36c642ce787c2ba2c9ec076250b12dac8c0546.tar.bz2
ayatana-indicator-datetime-fb36c642ce787c2ba2c9ec076250b12dac8c0546.zip
fix GAction leakage found while testing new unit tests with valgrind
Diffstat (limited to 'src')
-rw-r--r--src/actions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index 41c7f11..839c9cd 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -223,18 +223,26 @@ Actions::Actions(const std::shared_ptr<State>& state):
auto v = create_default_header_state();
auto a = g_simple_action_new_stateful("desktop-header", nullptr, v);
g_action_map_add_action(gam, G_ACTION(a));
+ g_object_unref(a);
+
a = g_simple_action_new_stateful("desktop_greeter-header", nullptr, v);
g_action_map_add_action(gam, G_ACTION(a));
+ g_object_unref(a);
+
a = g_simple_action_new_stateful("phone-header", nullptr, v);
g_action_map_add_action(gam, G_ACTION(a));
+ g_object_unref(a);
+
a = g_simple_action_new_stateful("phone_greeter-header", nullptr, v);
g_action_map_add_action(gam, G_ACTION(a));
+ g_object_unref(a);
// add the calendar action
v = create_calendar_state(state);
a = g_simple_action_new_stateful("calendar", G_VARIANT_TYPE_INT64, v);
g_action_map_add_action(gam, G_ACTION(a));
g_signal_connect(a, "activate", G_CALLBACK(on_calendar_activated), this);
+ g_object_unref(a);
///
/// Keep our GActionGroup's action's states in sync with m_state