telepathy-glib: TpConnection: break refcycle when invalidated

Xavier Claessens xclaesse at kemper.freedesktop.org
Wed Apr 3 02:29:22 PDT 2013


Module: telepathy-glib
Branch: master
Commit: 29f3243d20a1a239f3c7f3bc28b7fce17763f2ee
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=29f3243d20a1a239f3c7f3bc28b7fce17763f2ee

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Fri Mar 29 18:16:59 2013 +0100

TpConnection: break refcycle when invalidated

It is already explained in tp_connection_invalidated(), connection
must drop its refs to all TpContact at that point.

---

 telepathy-glib/connection.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index d111d09..0daf560 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -1310,6 +1310,8 @@ tp_connection_invalidated (TpConnection *self)
    * refcycle completely. */
   if (self->priv->roster != NULL)
     g_hash_table_remove_all (self->priv->roster);
+  g_clear_object (&self->priv->self_contact);
+  tp_clear_pointer (&self->priv->blocked_contacts, g_ptr_array_unref);
 }
 
 static gboolean



More information about the telepathy-commits mailing list