diff options
author | Mike Gorse <mgorse@suse.com> | 2012-12-27 16:50:04 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2012-12-27 16:50:04 -0500 |
commit | 233ec0f562e12adfbe1ca5182bebd22c19c31ea4 (patch) | |
tree | f9ee06c6a15c854cb6196e1d054487a2723c0fae /atspi/atspi-application.c | |
parent | aa13890a6ad1c7b7c743a343ea94995598c4709d (diff) | |
download | at-spi2-core-233ec0f562e12adfbe1ca5182bebd22c19c31ea4.tar.gz |
Fix some ref count issues
Add refs in some places where they were previously not present, and be more
thorough about removing refs when disposing. This should fix some leaks,
though it is likely that many still remain.
Also add a test program that can be used to test for some leaks.
Diffstat (limited to 'atspi/atspi-application.c')
-rw-r--r-- | atspi/atspi-application.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/atspi/atspi-application.c b/atspi/atspi-application.c index 90391908..65cabdc4 100644 --- a/atspi/atspi-application.c +++ b/atspi/atspi-application.c @@ -43,6 +43,8 @@ atspi_application_dispose (GObject *object) if (application->bus) { + if (application->bus != _atspi_bus ()) + dbus_connection_close (application->bus); dbus_connection_unref (application->bus); application->bus = NULL; } @@ -54,6 +56,12 @@ atspi_application_dispose (GObject *object) application->hash = NULL; } + if (application->root) + { + g_object_unref (application->root); + application->root = NULL; + } + G_OBJECT_CLASS (atspi_application_parent_class)->dispose (object); } |