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.
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.