if (application->bus)
{
+ if (application->bus != _atspi_bus ())
+ dbus_connection_close (application->bus);
dbus_connection_unref (application->bus);
application->bus = NULL;
}
application->hash = NULL;
}
+ if (application->root)
+ {
+ g_clear_object (&application->root->parent.app);
+ g_object_unref (application->root);
+ application->root = NULL;
+ }
+
G_OBJECT_CLASS (atspi_application_parent_class)->dispose (object);
}
{
AtspiApplication *application = ATSPI_APPLICATION (object);
- if (application->bus_name)
- g_free (application->bus_name);
+ g_free (application->bus_name);
+ g_free (application->toolkit_name);
+ g_free (application->toolkit_version);
+ g_free (application->atspi_version);
G_OBJECT_CLASS (atspi_application_parent_class)->finalize (object);
}
AtspiApplication *application;
application = g_object_new (ATSPI_TYPE_APPLICATION, NULL);
- if (application)
- {
- application->bus_name = g_strdup (bus_name);
- application->root = NULL;
- }
+ application->bus_name = g_strdup (bus_name);
+ application->root = NULL;
return application;
}