[evolution] Bug 629051 - Memory leak in gnome_calendar_constructed()



commit 6c02410d38881bd7c4bd63a77f6f50ae8c6f9389
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Sep 8 09:22:16 2010 -0400

    Bug 629051 - Memory leak in gnome_calendar_constructed()

 calendar/gui/gnome-cal.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 4d7d64d..089167e 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1487,6 +1487,7 @@ gnome_calendar_do_dispose (GObject *object)
 	GList *l;
 	GnomeCalendar *gcal;
 	GnomeCalendarPrivate *priv;
+	gint ii;
 
 	g_return_if_fail (object != NULL);
 	g_return_if_fail (GNOME_IS_CALENDAR (object));
@@ -1503,6 +1504,13 @@ gnome_calendar_do_dispose (GObject *object)
 		priv->model = NULL;
 	}
 
+	for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
+		if (priv->views[ii] != NULL) {
+			g_object_unref (priv->views[ii]);
+			priv->views[ii] = NULL;
+		}
+	}
+
 	for (l = priv->notifications; l; l = l->next)
 		calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
 	g_list_free (priv->notifications);



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