[gimp/soc-2010-cage] app: unref context, dialog_factory and ui_manager in GObject::dispose()
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] app: unref context, dialog_factory and ui_manager in GObject::dispose()
- Date: Wed, 30 Jun 2010 22:14:41 +0000 (UTC)
commit bd6aa949c17bdef4bd725abae54bc1bf42fc9885
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]