Bug 48471

Summary: TpConnection self_contact / TpContact circular reference results in a leak
Product: Telepathy Reporter: Vivek Dasmohapatra <vivek>
Component: libtelepathyAssignee: Vivek Dasmohapatra <vivek>
Status: RESOLVED DUPLICATE QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: will
Version: git masterKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.collabora.com/git/user/vivek/telepathy-glib/log/?h=tpconnections-are-leaky
Whiteboard:
i915 platform: i915 features:

Description Vivek Dasmohapatra 2012-04-09 10:11:31 UTC
TpContacts ref their parent TpConnection, the TpConnection
refs its self contact - the resulting circular ref results
in TpConnections never being freed.
Comment 1 Simon McVittie 2012-04-10 02:00:55 UTC
> The reffed TpContact in the self_contact member should be unreffed on dispose

Fine.

> TpContact is [potentially] reffed by TpConnection: can't hold a TpConnection ref

I think this is an API break: functionality that used to work (getting a contact's connection) no longer does.

We should certainly fix it on next (by breaking the circular ref in one direction or the other - probably the direction you've implemented here), but I don't think this is acceptable in a branch that isn't breaking API.
Comment 2 Vivek Dasmohapatra 2012-04-10 04:48:05 UTC
> I think this is an API break: functionality that used to work (getting a
> contact's connection) no longer does.

Ok. Any particular keyword/whiteboard-fu I should use to indicate that?
Comment 3 Will Thompson 2013-05-01 16:25:39 UTC
Fixed in 0.21.0.

*** This bug has been marked as a duplicate of bug 63027 ***

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.