[gimp/soc-2010-cage] app: run dispose manually on the dialog factory before unrefing it
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] app: run dispose manually on the dialog factory before unrefing it
- Date: Wed, 30 Jun 2010 22:14:51 +0000 (UTC)
commit 69939bf2b2a9d631a6c05ff182a61df545a5e293
Author: Michael Natterer <mitch gimp org>
Date: Thu Jun 24 12:51:46 2010 +0200
app: run dispose manually on the dialog factory before unrefing it
Because some of the dialogs the factory creates add a reference to
it, creating a cycle; so simply unrefing it doesn't do anything.
app/dialogs/dialogs.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/dialogs/dialogs.c b/app/dialogs/dialogs.c
index 84ebe1f..b1ccfe4 100644
--- a/app/dialogs/dialogs.c
+++ b/app/dialogs/dialogs.c
@@ -421,6 +421,11 @@ dialogs_exit (Gimp *gimp)
if (gimp_dialog_factory_get_singleton ())
{
+ /* run dispose manually so the factory destroys its dialogs, which
+ * might in turn directly or indirectly ref the factory
+ */
+ g_object_run_dispose (G_OBJECT (gimp_dialog_factory_get_singleton ()));
+
g_object_unref (gimp_dialog_factory_get_singleton ());
gimp_dialog_factory_set_singleton (NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]