[gtk+] GtkApplication: Fix two muxer-related memory leaks
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkApplication: Fix two muxer-related memory leaks
- Date: Sun, 25 May 2014 10:50:43 +0000 (UTC)
commit 750f6b9913c092fbadec5e2421c153536ef83004
Author: Kalev Lember <kalevlember gmail com>
Date: Mon May 19 13:19:11 2014 +0200
GtkApplication: Fix two muxer-related memory leaks
Drop the ref on the action muxer in finalize, and also make sure
shutdown() tears down the muxer setup done in startup().
When GtkApplication adds itself to a muxer, it causes the muxer to take
a ref on the GtkApplication. This has to be undone in shutdown() to make
sure the GtkApplication doesn't end up holding a ref on itself.
https://bugzilla.gnome.org/show_bug.cgi?id=730383
gtk/gtkapplication.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index a777ec6..a8b9981 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -522,6 +522,8 @@ gtk_application_shutdown (GApplication *g_application)
gtk_application_impl_shutdown (application->priv->impl);
g_clear_object (&application->priv->impl);
+ gtk_action_muxer_remove (application->priv->muxer, "app");
+
/* Keep this section in sync with gtk_main() */
/* Try storing all clipboard data we have */
@@ -767,6 +769,7 @@ gtk_application_finalize (GObject *object)
g_clear_object (&application->priv->app_menu);
g_clear_object (&application->priv->menubar);
+ g_clear_object (&application->priv->muxer);
accels_finalize (&application->priv->accels);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]