[ekiga] Made the dbus component stop leaking references to the main Ekiga::ServiceCore
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Made the dbus component stop leaking references to the main Ekiga::ServiceCore
- Date: Fri, 8 Jun 2012 18:48:29 +0000 (UTC)
commit bc12140353588bef836ef25624581d593d7082a0
Author: Julien Puydt <jpuydt free fr>
Date: Fri Jun 8 20:47:16 2012 +0200
Made the dbus component stop leaking references to the main Ekiga::ServiceCore
I can confirm that the following objects get released correctly now (printf debugging for ever!):
- the Ekiga::ServiceCore main object
- the GtkFrontend::GtkFrontend service
- the status icon widget
- the Ekiga::CallCore service
- the Opal::CallManager service
src/dbus-helper/dbus.cpp | 8 ++++----
src/dbus-helper/dbus.h | 2 +-
src/gui/main.cpp | 3 ++-
3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/dbus-helper/dbus.cpp b/src/dbus-helper/dbus.cpp
index 5261bab..cdc4748 100644
--- a/src/dbus-helper/dbus.cpp
+++ b/src/dbus-helper/dbus.cpp
@@ -59,7 +59,7 @@ G_DEFINE_TYPE(EkigaDBusComponent, ekiga_dbus_component, G_TYPE_OBJECT);
struct _EkigaDBusComponentPrivate
{
- Ekiga::ServiceCorePtr core;
+ Ekiga::ServiceCore* service_core;
};
/**************************
@@ -134,7 +134,7 @@ ekiga_dbus_component_call (EkigaDBusComponent *self,
const gchar *uri,
G_GNUC_UNUSED GError **error)
{
- boost::shared_ptr<Ekiga::CallCore> call_core = self->priv->core->get<Ekiga::CallCore> ("call-core");
+ boost::shared_ptr<Ekiga::CallCore> call_core = self->priv->service_core->get<Ekiga::CallCore> ("call-core");
call_core->dial (uri);
return TRUE;
@@ -232,7 +232,7 @@ ekiga_dbus_claim_ownership ()
* the manager and other key components are running.
*/
EkigaDBusComponent *
-ekiga_dbus_component_new (Ekiga::ServiceCorePtr core)
+ekiga_dbus_component_new (Ekiga::ServiceCore& service_core)
{
DBusGConnection *bus;
GError *error = NULL;
@@ -246,7 +246,7 @@ ekiga_dbus_component_new (Ekiga::ServiceCorePtr core)
}
obj = EKIGA_DBUS_COMPONENT (g_object_new (EKIGA_TYPE_DBUS_COMPONENT, NULL));
- obj->priv->core = core;
+ obj->priv->service_core = &service_core;
dbus_g_connection_register_g_object (bus, EKIGA_DBUS_PATH, G_OBJECT (obj));
return obj;
diff --git a/src/dbus-helper/dbus.h b/src/dbus-helper/dbus.h
index 11a9447..1480628 100644
--- a/src/dbus-helper/dbus.h
+++ b/src/dbus-helper/dbus.h
@@ -62,7 +62,7 @@ struct _EkigaDBusComponent {
typedef GObjectClass EkigaDBusComponentClass;
GType ekiga_dbus_component_get_type ();
-EkigaDBusComponent *ekiga_dbus_component_new (Ekiga::ServiceCorePtr core);
+EkigaDBusComponent *ekiga_dbus_component_new (Ekiga::ServiceCore& core);
gboolean ekiga_dbus_claim_ownership ();
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index db58862..4c1ccc3 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -190,6 +190,7 @@ main (int argc,
engine_init (service_core, argc, argv);
GnomeMeeting::Process ()->BuildGUI (*service_core);
+
main_window = GnomeMeeting::Process ()->GetMainWindow ();
const int schema_version = MAJOR_VERSION * 1000
@@ -222,7 +223,7 @@ main (int argc,
}
#ifdef HAVE_DBUS
- EkigaDBusComponent *dbus_component = ekiga_dbus_component_new (service_core);
+ EkigaDBusComponent *dbus_component = ekiga_dbus_component_new (*service_core);
#endif
/* The GTK loop */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]