summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-11-20 12:18:39 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-11-20 19:59:00 +0100
commit48b23bbfa0271ed327f668933b92d2ae9b99e806 (patch)
treef4a2893ab75c3b50132255ae24b042e089046dc1 /basic
parent03e9ae0a10bfcc91e646b67b032c1fb7b26da0d3 (diff)
tdf#128434 free the BasicManager event listener
This gets rid of the last 72 lost bytes I could identify in the huge valgrind logs to look like its PDF generation related. Change-Id: Idda3c2c5b7f5ce0211199b86503037b74438ccf2 Reviewed-on: https://gerrit.libreoffice.org/83302 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 9e3aecc249e0..edc73fed8c4a 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -537,12 +537,16 @@ namespace basic
OSL_PRECOND( _pos != m_aStore.end(), "ImplRepository::impl_removeFromRepository: invalid position!" );
std::unique_ptr<BasicManager> pManager = std::move(_pos->second);
+ Reference<XModel> xModel(_pos->first, UNO_QUERY);
// *first* remove from map (else Notify won't work properly)
m_aStore.erase( _pos );
- // *then* delete the BasicManager
EndListening( *pManager );
+
+ assert(xModel.is());
+ if (xModel.is())
+ stopComponentListening(xModel);
}