[Bug 32222] Potential cyclic references when using request and handle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 8 18:06:41 CET 2010


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

--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-12-08 09:06:40 PST ---
> +   * borrowed path (gchar *) => weakref TpChannel */

That's not a weak ref: nobody has called g_object_weak_ref(). If you're relying
on the fact that TpProxy::invalidated is emitted in dispose, you should
specifically say so.

I still think it's wrong to assume that unreffing a TpChannel is enough to get
it closed; if you're particularly attached to this implementation, please add a
comment indicating that you're relying on TpProxy::invalidated during dispose,
and emit a g_warning() or something if the proxy is invalidated with
TP_DBUS_ERROR_PROXY_UNREFERENCED (which a correct Handler shouldn't cause to
happen).

That'll also mean that when we stop emitting invalidated during dispose, the
use of TP_DBUS_ERROR_PROXY_UNREFERENCED will become an error and we'll fix the
assumption that's no longer true :-)

An alternative would be to handle the "channel released without closing it"
case with g_object_weak_ref(), and emit the g_warning() from the weak-ref
callback.

-- 
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