diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-09-22 18:32:35 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-21 12:37:45 +0100 |
commit | f3538c4210447c572aa82cb2eb0305ef7f70b2b3 (patch) | |
tree | 89bbe8bea649d4fd6d1e4d9af4a05bbc2907a64c | |
parent | 72e865d96b266cc8c9c0586fff2a36382b23d7ec (diff) | |
download | dbus-glib-f3538c4210447c572aa82cb2eb0305ef7f70b2b3.tar.gz |
test-types: use a private bus, and close it afterwards
This frees more of the memory.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | test/core/test-types.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/core/test-types.c b/test/core/test-types.c index c6c6dd3..58f309c 100644 --- a/test/core/test-types.c +++ b/test/core/test-types.c @@ -32,7 +32,7 @@ main (int argc, char **argv) dbus_error_init (&derror); /* Check DBusGConnection -> DBusConnection -> DBusGConnection */ - gconn = dbus_g_bus_get (DBUS_BUS_SESSION, &gerror); + gconn = dbus_g_bus_get_private (DBUS_BUS_SESSION, NULL, &gerror); if (!gconn) lose ("Cannot get connection: %s", gerror->message); @@ -43,8 +43,10 @@ main (int argc, char **argv) gconn2 = dbus_connection_get_g_connection (conn); if (gconn != gconn2) lose ("Retrieved DBusGConection != original DBusGConnection"); - + + dbus_connection_close (conn); dbus_g_connection_unref (gconn); - + dbus_shutdown (); + return 0; } |