From connection.c::tp_connection_invalidated(): /* Drop the ref we have on all roster contacts, this is to break the refcycle * we have between TpConnection and TpContact, otherwise self would never * run dispose. * Note that invalidated is also called from dispose, so self->priv->roster * could already be NULL. * * FIXME: When we decide to break tp-glib API/guarantees, we should stop * TpContact taking a strong ref on its TpConnection and force user to keep * a ref on the TpConnection to use its TpContact, this would avoid the * refcycle completely. */
Created attachment 62384 [details] [review] Abort preparing contact-list feature early if CONTACTS iface is missing Current code has issues: 1) It's possible it completes without returning to mainloop first 2) contact-list-state could regress from SUCCESS to FAILED
Created attachment 62385 [details] [review] Small coding style fix
Created attachment 62386 [details] [review] TpConnection: Fix leaked result when preparing contact-list feature
Created attachment 62387 [details] [review] Rename _tp_contact_connection_invalidated to _disposed That function is called from TpConnection::dispose, not when invalidated
Created attachment 62388 [details] [review] TpContact: stop keeping strong ref on its connection Reset TpContact::connection to NULL when connection is disposed
Created attachment 62389 [details] [review] Add unit test for TpContact<>TpConnection refcounting
patches 1-4 probably needs backporting to master.
Created attachment 62390 [details] [review] NEWS
(In reply to comment #7) > patches 1-4 probably needs backporting to master. Guillaume reviewed them and they are merged in master already.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.