diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-08 17:06:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-09 08:57:02 +0000 |
commit | de978c0437620b84c3678705c926804318f6a996 (patch) | |
tree | a7f5c5073b10ff51c66e13024489730b3a0b3058 /sd | |
parent | bd556fcb093c3e26eafa875e371e2729021e37fe (diff) |
valgrind: fix leak
==2184== 1,396 (24 direct, 1,372 indirect) bytes in 1 blocks are definitely lost in loss record 11,080 of 11,791
...
==2184== by 0x31D4F774: sd::framework::BasicPaneFactory::createResource(com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId> const&) (BasicPaneFactory.cxx:258)
...
==2184== by 0x31D3F550: sd::framework::ConfigurationControllerResourceManager::ActivateResources(std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId>, std::allocator<com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId> > > const&, com::sun::star::uno::Reference<com::sun::star::drawing::framework::XConfiguration> const&) (ConfigurationControllerResourceManager.cxx:74)
...
==2184== by 0x31D426A3: sd::framework::ConfigurationUpdater::UpdateCore(sd::framework::ConfigurationClassifier const&) (ConfigurationUpdater.cxx:247)
==2184== by 0x31D42B76: sd::framework::ConfigurationUpdater::UpdateConfiguration() (ConfigurationUpdater.cxx:156)
==2184== by 0x31D42F3E: sd::framework::ConfigurationUpdater::RequestUpdate(com::sun::star::uno::Reference<com::sun::star::drawing::framework::XConfiguration> const&) (ConfigurationUpdater.cxx:103)
Change-Id: I257ae26bc0e61696b1c8e27a1b3a75a993fac1a5
Reviewed-on: https://gerrit.libreoffice.org/34982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/configuration/ResourceFactoryManager.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx index 29a157d7fd12..adf3ed13f5bf 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx @@ -50,6 +50,16 @@ ResourceFactoryManager::ResourceFactoryManager (const Reference<XControllerManag ResourceFactoryManager::~ResourceFactoryManager() { + for (auto iXInterfaceResource = maFactoryMap.begin(); + iXInterfaceResource != maFactoryMap.end(); + ++iXInterfaceResource) + { + Reference<lang::XComponent> xComponent (iXInterfaceResource->second, UNO_QUERY); + iXInterfaceResource->second = nullptr; + if (xComponent.is()) + xComponent->dispose(); + } + Reference<lang::XComponent> xComponent (mxURLTransformer, UNO_QUERY); if (xComponent.is()) xComponent->dispose(); |