From 412c52341017e249042fda980ff22dbaa6475a60 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Fri, 13 Jun 2008 16:56:57 +0200 Subject: [PATCH] Free cached attributes on _finalize () --- src/mm-attribute-base-manager.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mm-attribute-base-manager.c b/src/mm-attribute-base-manager.c index 17bbc66..955c051 100644 --- a/src/mm-attribute-base-manager.c +++ b/src/mm-attribute-base-manager.c @@ -133,6 +133,14 @@ mm_attribute_base_manager_get (void) } static void +mm_attribute_base_manager_finalize (GObject *o) +{ + g_hash_table_destroy (cached_attrs); + + G_OBJECT_CLASS (mm_attribute_base_manager_parent_class)->finalize (o); +} + +static void mm_attribute_base_manager_init (MMAttributeBaseManager *abm) { if (!cached_attrs) { @@ -144,5 +152,5 @@ mm_attribute_base_manager_init (MMAttributeBaseManager *abm) static void mm_attribute_base_manager_class_init (MMAttributeBaseManagerClass *klass) { - + G_OBJECT_CLASS (klass)->finalize = mm_attribute_base_manager_finalize; } -- 2.11.4.GIT