tp_account_manager_set_default() adds an internal ref to @manager that can't be be dropped. This can be annoying to debug leaks. Usually we only keep weak ref to singletons, like tp_account_manager_dup() does. Note: from a quick look, empathy actually depend on this behaviour since empathy_init() does not keep the initial ref on its AM. So when/if fixing this bug, we need to make sure to fix that in empathy too.
Created attachment 60571 [details] [review] tp_am_set_default(): Take a weak ref instead of a strong one
Comment on attachment 60571 [details] [review] tp_am_set_default(): Take a weak ref instead of a strong one Review of attachment 60571 [details] [review]: ----------------------------------------------------------------- Looks good, but I've slightly re-worded your doc. ::: telepathy-glib/account-manager.c @@ +786,5 @@ > * tp_account_manager_new_with_factory(). > * > + * Only a weak reference is taken on @manager, it is caller's responsability to > + * keep it alive. Otherwise next call to tp_account_manager_dup() will return > + * a newly created #TpAccountManager. Only a weak reference is taken on @manager. It is the caller's responsibility to keep it alive. If @manager is disposed after calling this function, the next call to tp_account_manager_dup() will return a newly created #TpAccountManager.
Thanks, merged with your text.
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.