[gimp] app: free ui_manager_name in finalize()



commit 40423b26a8ca7c6bbe8c6162e182d8eefa9363e3
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jun 26 23:28:17 2010 +0200

    app: free ui_manager_name in finalize()

 app/widgets/gimpdockwindow.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index d5de026..d1bc041 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -113,6 +113,7 @@ static GObject * gimp_dock_window_constructor             (GType
                                                            guint                  n_params,
                                                            GObjectConstructParam *params);
 static void      gimp_dock_window_dispose                 (GObject               *object);
+static void      gimp_dock_window_finalize                (GObject               *object);
 static void      gimp_dock_window_set_property            (GObject               *object,
                                                            guint                  property_id,
                                                            const GValue          *value,
@@ -164,6 +165,7 @@ gimp_dock_window_class_init (GimpDockWindowClass *klass)
 
   object_class->constructor  = gimp_dock_window_constructor;
   object_class->dispose      = gimp_dock_window_dispose;
+  object_class->finalize     = gimp_dock_window_finalize;
   object_class->set_property = gimp_dock_window_set_property;
   object_class->get_property = gimp_dock_window_get_property;
 
@@ -482,6 +484,20 @@ gimp_dock_window_dispose (GObject *object)
 }
 
 static void
+gimp_dock_window_finalize (GObject *object)
+{
+  GimpDockWindow *dock_window = GIMP_DOCK_WINDOW (object);
+
+  if (dock_window->p->ui_manager_name)
+    {
+      g_free (dock_window->p->ui_manager_name);
+      dock_window->p->ui_manager_name = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
 gimp_dock_window_set_property (GObject      *object,
                                guint         property_id,
                                const GValue *value,



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