Bug 19662

Summary: Leaks when using OptionalInterfaceFactory
Product: Telepathy Reporter: Andre Moreira Magalhaes <andrunko>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED NOTABUG QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: major    
Priority: high    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Andre Moreira Magalhaes 2009-01-20 09:27:30 UTC
Some classes (such as Account/Connection) uses OptionalInterfaceFactory to get an optional interface. The first time an optional interface is requested it will be cached by OptionalInterfaceFactory, meaning that the returned object cannot be destroyed by the calling, or the cache will be invalidated.
This way the classes using OptionalInterfaceFactory are not deleting the optional interfaces, causing memory leaks.
Comment 1 Olli Salli 2009-02-02 10:10:11 UTC
As discussed over IRC, the OptionalInterfaceFactory destroys all cached proxies when it itself is destroyed. Hence there will be no memory leaks - it is exactly the intent that the proxies will stay around so there is no need to construct them all over and over again.

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.