From 6c02410d38881bd7c4bd63a77f6f50ae8c6f9389 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 8 Sep 2010 09:22:16 -0400 Subject: Bug 629051 - Memory leak in gnome_calendar_constructed() --- calendar/gui/gnome-cal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 4d7d64d3ba..089167e3a5 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); -- cgit