[frogr] Unref GTK builder on dispose() instead of finalize()



commit 9b7407edd26663b878f6f33730fd3b36c5b3deea
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Thu Aug 25 09:01:28 2011 +0200

    Unref GTK builder on dispose() instead of finalize()

 src/frogr-main-view.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index c7099b9..5b5db15 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -1450,6 +1450,12 @@ _frogr_main_view_dispose (GObject *object)
       priv->tree_model = NULL;
     }
 
+  if (priv->builder)
+    {
+      g_object_unref (priv->builder);
+      priv->builder = NULL;
+    }
+
   G_OBJECT_CLASS(frogr_main_view_parent_class)->dispose (object);
 }
 
@@ -1458,9 +1464,7 @@ _frogr_main_view_finalize (GObject *object)
 {
   FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (object);
 
-  gtk_widget_destroy (priv->pictures_ctxt_menu);
   gtk_widget_destroy (GTK_WIDGET (priv->window));
-  g_object_unref (G_OBJECT (priv->builder));
 
   G_OBJECT_CLASS(frogr_main_view_parent_class)->finalize (object);
 }



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