[glib/wip/gmenu: 52/59] Fix some GMenu and GMenuItem leaking
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gmenu: 52/59] Fix some GMenu and GMenuItem leaking
- Date: Fri, 2 Dec 2011 21:35:28 +0000 (UTC)
commit 5c9fe54a5e30acf6e7b90269d09f1767d96802be
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Dec 1 22:53:07 2011 -0500
Fix some GMenu and GMenuItem leaking
gio/gapplication.c | 6 ++++++
gio/gmenumarkup.c | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index b9594fb..8dbc3e8 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -639,6 +639,12 @@ g_application_finalize (GObject *object)
if (g_application_get_default () == application)
g_application_set_default (NULL);
+ if (application->priv->app_menu)
+ g_object_unref (application->priv->app_menu);
+
+ if (application->priv->menubar)
+ g_object_unref (application->priv->menubar);
+
G_OBJECT_CLASS (g_application_parent_class)
->finalize (object);
}
diff --git a/gio/gmenumarkup.c b/gio/gmenumarkup.c
index 0eb59f7..24a2dfb 100644
--- a/gio/gmenumarkup.c
+++ b/gio/gmenumarkup.c
@@ -117,6 +117,7 @@ g_menu_markup_pop_frame (GMenuMarkupState *state)
{
g_assert (prev->menu != NULL);
g_menu_append_item (prev->menu, state->frame.item);
+ g_object_unref (state->frame.item);
}
state->frame = *prev;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]