[Bug 32222] Potential cyclic references when using request and handle
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Dec 9 12:05:13 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=32222
--- Comment #5 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-12-09 03:05:13 PST ---
(In reply to comment #4)
> So I disagree with adding a g_warning() since I see now reason an explicit
> Close() is required, and not emitting "invalidated" on dispose would be API
> break IMO. Though the API doc could recommand to close a channel.
Not emitting invalidated on dispose would indeed be an API break, but it's an
API break we want to make for telepathy-glib 1.0.
As a general design principle I'm against having things happen implicitly in
dispose, because I want it to be safe to add appropriate refs. For instance, a
GAsyncResult holds a ref to both its source object and the user-data, for the
duration of the async call - that prevents a whole class of bugs, but if you
rely on dispose to Close channels, it'll delay the Close.
(For the cases where you really do need to pass a weak ref into an async call,
we have TpWeakRef, which is designed to be used as a user-data.)
--
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