[glib/wip/gcleanup] gresolver: Cleanup global data
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] gresolver: Cleanup global data
- Date: Thu, 7 Nov 2013 22:04:47 +0000 (UTC)
commit 3a67d51e9a020b64662a944990e0362f38a56613
Author: Stef Walter <stefw gnome org>
Date: Thu Nov 7 23:01:25 2013 +0100
gresolver: Cleanup global data
gio/gresolver.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gio/gresolver.c b/gio/gresolver.c
index 919ee13..d795975 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -202,7 +202,10 @@ GResolver *
g_resolver_get_default (void)
{
if (!default_resolver)
- default_resolver = g_object_new (G_TYPE_THREADED_RESOLVER, NULL);
+ {
+ default_resolver = g_object_new (G_TYPE_THREADED_RESOLVER, NULL);
+ G_CLEANUP (default_resolver, g_object_unref);
+ }
return g_object_ref (default_resolver);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]