Bug 9812 - TpDynamicHandleRepo doesn't use tp_get_bus_proxy; tp_get_bus_proxy leaks a reference
Summary: TpDynamicHandleRepo doesn't use tp_get_bus_proxy; tp_get_bus_proxy leaks a re...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: All All
: lowest enhancement
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-01-30 07:45 UTC by Simon McVittie
Modified: 2009-08-18 08:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.