[Xfce4-commits] <xfconf:master> Free backends hash table on exit.

Nick Schermer noreply at xfce.org
Mon Feb 8 19:56:08 CET 2010


Updating branch refs/heads/master
         to dd39de1f20e168ebc4b101b5010ec2f944d86d3e (commit)
       from 9009610f6fa185815f6ebd5c00da7cb64f17b41e (commit)

commit dd39de1f20e168ebc4b101b5010ec2f944d86d3e
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Feb 8 18:44:58 2010 +0100

    Free backends hash table on exit.

 xfconfd/main.c                   |    3 +++
 xfconfd/xfconf-backend-factory.c |   10 ++++++++++
 xfconfd/xfconf-backend-factory.h |    2 ++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/xfconfd/main.c b/xfconfd/main.c
index cbdc269..2d8a80f 100644
--- a/xfconfd/main.c
+++ b/xfconfd/main.c
@@ -50,6 +50,7 @@
 #include <libxfce4util/libxfce4util.h>
 
 #include "xfconf-daemon.h"
+#include "xfconf-backend-factory.h"
 
 #define DEFAULT_BACKEND  "xfce-perchannel-xml"
 
@@ -231,6 +232,8 @@ main(int argc,
     g_main_loop_run(mloop);
     
     g_object_unref(G_OBJECT(xfconfd));
+
+    xfconf_backend_factory_cleanup();
     
     if(signal_watch) {
         g_source_remove(signal_watch);
diff --git a/xfconfd/xfconf-backend-factory.c b/xfconfd/xfconf-backend-factory.c
index c893b3f..307d7c7 100644
--- a/xfconfd/xfconf-backend-factory.c
+++ b/xfconfd/xfconf-backend-factory.c
@@ -87,3 +87,13 @@ xfconf_backend_factory_get_backend(const gchar *type,
     
     return backend;
 }
+
+
+void
+xfconf_backend_factory_cleanup (void)
+{
+  if(backends) {
+      g_hash_table_destroy(backends);
+      backends = NULL;
+  }
+}
diff --git a/xfconfd/xfconf-backend-factory.h b/xfconfd/xfconf-backend-factory.h
index 0dde2c9..6b162f1 100644
--- a/xfconfd/xfconf-backend-factory.h
+++ b/xfconfd/xfconf-backend-factory.h
@@ -29,6 +29,8 @@ G_BEGIN_DECLS
 XfconfBackend *xfconf_backend_factory_get_backend(const gchar *type,
                                                   GError **error);
 
+void xfconf_backend_factory_cleanup (void);
+
 G_END_DECLS
 
 #endif  /* __XFCONF_BACKEND_FACTORY_H__ */



More information about the Xfce4-commits mailing list