Bug 9812

Summary: TpDynamicHandleRepo doesn't use tp_get_bus_proxy; tp_get_bus_proxy leaks a reference
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-glibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: lowest Keywords: patch
Version: unspecified   
Hardware: All   
OS: All   
URL: http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/libdbus
Whiteboard:
i915 platform: i915 features:

Description Simon McVittie 2007-01-30 07:45:36 UTC
TpDynamicHandleRepo uses dbus_g_proxy_new_for_name directly, instead of calling our convenience function tp_get_bus_proxy to do the same thing.

On the other hand, tp_get_bus_proxy leaks one reference to the proxy per process, so the proxy is never actually freed. Perhaps we should define it to return a new reference, and have it weakly reference the proxy so it can be reused if still alive.

tp_get_bus leaks a reference in any case, since the bus is referenced by libdbus.
Comment 1 Simon McVittie 2009-04-14 06:38:59 UTC
Bouncing this to the mailing list, I'm unlikely to solve this any time soon.
Comment 2 Simon McVittie 2009-08-17 08:12:42 UTC
Addressed in passing by my libdbus branch. (Now I remember why we don't usually use libdbus directly... :-/ )
Comment 3 Simon McVittie 2009-08-18 08:04:18 UTC
Fixed in 0.7.35: TpDynamicHandleRepo now uses tp_dbus_daemon_watch_name_owner, and tp_get_bus_proxy is deprecated.

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.