[glib/wip/gcleanup: 18/42] gresolver: Cleanup global data
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup: 18/42] gresolver: Cleanup global data
- Date: Wed, 13 Nov 2013 12:05:00 +0000 (UTC)
commit e53479cf7c9d2eefb1b8aa50f347157ab6ddbe2a
Author: Stef Walter <stefw gnome org>
Date: Thu Nov 7 23:01:25 2013 +0100
gresolver: Cleanup global data
https://bugzilla.gnome.org/show_bug.cgi?id=711799
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]