[glib/wip/gcleanup: 96/106] gdbusname: Cleanup global tables



commit 2ffc050348975f4d49d68a44dd6f871d527fda6f
Author: Stef Walter <stefw gnome org>
Date:   Sat Nov 9 20:15:56 2013 +0100

    gdbusname: Cleanup global tables
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711799

 gio/gdbusnameowning.c   |    1 +
 gio/gdbusnamewatching.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index 791d2f5..dc1b017 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -650,6 +650,7 @@ g_bus_own_name (GBusType                  bus_type,
   if (map_id_to_client == NULL)
     {
       map_id_to_client = g_hash_table_new (g_direct_hash, g_direct_equal);
+      G_CLEANUP_IN_PHASE (map_id_to_client, g_hash_table_unref, G_CLEANUP_PHASE_LATE);
     }
   g_hash_table_insert (map_id_to_client,
                        GUINT_TO_POINTER (client->id),
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 12e8ed7..e3a5064 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -574,6 +574,7 @@ g_bus_watch_name (GBusType                  bus_type,
   if (map_id_to_client == NULL)
     {
       map_id_to_client = g_hash_table_new (g_direct_hash, g_direct_equal);
+      G_CLEANUP_IN_PHASE (map_id_to_client, g_hash_table_unref, G_CLEANUP_PHASE_LATE);
     }
   g_hash_table_insert (map_id_to_client,
                        GUINT_TO_POINTER (client->id),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]