[glib/wip/gcleanup] gdbusintrospection: Free up cache when done with it
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] gdbusintrospection: Free up cache when done with it
- Date: Sat, 9 Nov 2013 19:56:11 +0000 (UTC)
commit d5edf336e80bd94f32f50b87e26ecec2335fdecd
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:14:49 2013 +0100
gdbusintrospection: Free up cache when done with it
gio/gdbusintrospection.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusintrospection.c b/gio/gdbusintrospection.c
index c5f80ec..2b33a86 100644
--- a/gio/gdbusintrospection.c
+++ b/gio/gdbusintrospection.c
@@ -2145,7 +2145,11 @@ g_dbus_interface_info_cache_release (GDBusInterfaceInfo *info)
if (cache->use_count == 0)
{
g_hash_table_remove (info_cache, info);
- /* could nuke info_cache itself if empty */
+ if (g_hash_table_size (info_cache) == 0)
+ {
+ g_hash_table_unref (info_cache);
+ info_cache = NULL;
+ }
}
out:
G_UNLOCK (info_cache_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]