[Bug 42702] TpContact: add API to know if a contact is channel specific

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 8 14:58:37 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=42702

--- Comment #3 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-11-08 05:58:37 PST ---
The big problem is that we don't want to introduce a ref cycle between the
TpContact and the TpChannel (the TpChannel currently has a ref on the contact).

We have 2 options here:

A) The TpContact keeps a weak ref on the TpChannel. I don't like this option
because that means that if user drops the ref on the TpChannel we can't give it
back to him using this API. That makes a bit pointless and not reliable: an API
shouldn't have a different comportement if you dropped so misc ref before.

B) The TpContacts keeps a strong ref on the TpChannel and breaks the cycle when
the the channel is invalidated. I don't like this approach either because that
means TpContact and TpChannel objects will stay alive until the channel is
closed. For process like Observer or Approvers who just want to do a few things
with the channel and then forget about it that would result in a massive waste
of memory.

So I think I'm going to defer this for now.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list