diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-08 21:22:16 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-08 21:22:16 +0800 |
commit | 6c02410d38881bd7c4bd63a77f6f50ae8c6f9389 (patch) | |
tree | dba312965b8bc30bc0f11bfb7bec1e21e3ec5d75 /calendar/gui | |
parent | e841c0622c5c718be893c9d47ade55fc4151c6c9 (diff) | |
download | gsoc2013-evolution-6c02410d38881bd7c4bd63a77f6f50ae8c6f9389.tar.gz gsoc2013-evolution-6c02410d38881bd7c4bd63a77f6f50ae8c6f9389.tar.zst gsoc2013-evolution-6c02410d38881bd7c4bd63a77f6f50ae8c6f9389.zip |
Bug 629051 - Memory leak in gnome_calendar_constructed()
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | 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 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); |