[gedit] GeditWindow: Move remaining object unreffing from finalize() to dispose()



commit c30ac60aa58191c8cbf7ea22c2f5adebfc7e1e81
Author: Steve Frécinaux <code istique net>
Date:   Thu Jan 20 17:23:43 2011 +0100

    GeditWindow: Move remaining object unreffing from finalize() to dispose()

 gedit/gedit-window.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 0dcc99c..2fccbf8 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -335,6 +335,12 @@ gedit_window_dispose (GObject *object)
 		window->priv->window_settings = NULL;
 	}
 
+	if (window->priv->default_location != NULL)
+	{
+		g_object_unref (window->priv->default_location);
+		window->priv->default_location = NULL;
+	}
+
 	/* Now that there have broken some reference loops,
 	 * force collection again.
 	 */
@@ -350,15 +356,8 @@ gedit_window_dispose (GObject *object)
 static void
 gedit_window_finalize (GObject *object)
 {
-	GeditWindow *window; 
-
 	gedit_debug (DEBUG_WINDOW);
 
-	window = GEDIT_WINDOW (object);
-
-	if (window->priv->default_location != NULL)
-		g_object_unref (window->priv->default_location);
-
 	G_OBJECT_CLASS (gedit_window_parent_class)->finalize (object);
 }
 



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