[gimp] app: unref context, dialog_factory and ui_manager in GObject::dispose()



commit 3c565a17366450c7e92c1765574ee5e576981559
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jun 24 12:49:54 2010 +0200

    app: unref context, dialog_factory and ui_manager in GObject::dispose()
    
    The were not unrefed at all before

 app/widgets/gimptoolbox.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 56b4c9d..2130af8 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -410,6 +410,24 @@ gimp_toolbox_dispose (GObject *object)
 
   toolbox->p->in_destruction = TRUE;
 
+  if (toolbox->p->context)
+    {
+      g_object_unref (toolbox->p->context);
+      toolbox->p->context = NULL;
+    }
+
+  if (toolbox->p->dialog_factory)
+    {
+      g_object_unref (toolbox->p->dialog_factory);
+      toolbox->p->dialog_factory = NULL;
+    }
+
+  if (toolbox->p->ui_manager)
+    {
+      g_object_unref (toolbox->p->ui_manager);
+      toolbox->p->ui_manager = NULL;
+    }
+
   G_OBJECT_CLASS (parent_class)->dispose (object);
 
   toolbox->p->in_destruction = FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]