Re: [evolution-patches] Simple Leak Fix



On Thu, 2003-05-15 at 10:46, JP Rosevear wrote:
> Pretty straightforward.

Yet its still not right, fix attached.

-JP
-- 
JP Rosevear <jpr ximian com>
Ximian, Inc.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1764
diff -u -r1.1764 ChangeLog
--- ChangeLog	14 May 2003 18:45:53 -0000	1.1764
+++ ChangeLog	15 May 2003 15:44:29 -0000
@@ -1,3 +1,8 @@
+2003-05-15  JP Rosevear  <jpr ximian com>
+
+	* gui/dialogs/comp-editor.c (comp_editor_finalize): unref the
+	client and the ui component
+
 2003-05-14  JP Rosevear  <jpr ximian com>
 
 	* gui/e-tasks.c (e_tasks_destroy): guard against multiple destroys
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.75
diff -u -r1.75 comp-editor.c
--- gui/dialogs/comp-editor.c	22 Apr 2003 21:15:41 -0000	1.75
+++ gui/dialogs/comp-editor.c	15 May 2003 15:44:29 -0000
@@ -262,8 +262,12 @@
 	editor = COMP_EDITOR (object);
 	priv = editor->priv;
 
-	g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
-
+	if (priv->client) {
+		g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
+		g_object_unref (priv->client);
+		priv->client = NULL;
+	}
+	
 	/* We want to destroy the pages after the widgets get destroyed,
 	   since they have lots of signal handlers connected to the widgets
 	   with the pages as the data. */
@@ -274,6 +278,8 @@
 		g_object_unref((priv->comp));
 		priv->comp = NULL;
 	}
+
+	bonobo_object_unref (priv->uic);
 
 	g_free (priv);
 	editor->priv = NULL;


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