aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-01-04 21:53:21 +0800
committerMilan Crha <mcrha@redhat.com>2012-01-04 21:54:17 +0800
commitef8832bb8035edaad77749413afc110e9b8ea01e (patch)
tree921761e1f057b33efccf0ecfa676504064c775f1 /e-util
parent064d9187ab85ad1987b3cd0440fec33b6254ac20 (diff)
downloadgsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.gz
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.zst
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.zip
Bug #665036 - Memory leaks spot in Contacts view
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-sorter-array.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index b36eb06007..106a2d66ca 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -248,6 +248,18 @@ e_sorter_array_append (ESorterArray *esa,
}
}
+static void
+esa_finalize (GObject *object)
+{
+ ESorterArray *esa = E_SORTER_ARRAY (object);
+
+ if (esa)
+ e_sorter_array_clean (esa);
+
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (e_sorter_array_parent_class)->finalize (object);
+}
+
ESorterArray *
e_sorter_array_construct (ESorterArray *esa,
ECreateCmpCacheFunc create_cmp_cache,
@@ -273,8 +285,11 @@ e_sorter_array_new (ECreateCmpCacheFunc create_cmp_cache,
static void
e_sorter_array_class_init (ESorterArrayClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
ESorterClass *sorter_class = E_SORTER_CLASS (klass);
+ object_class->finalize = esa_finalize;
+
sorter_class->model_to_sorted = esa_model_to_sorted;
sorter_class->sorted_to_model = esa_sorted_to_model;
sorter_class->get_model_to_sorted_array = esa_get_model_to_sorted_array;