summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-12 14:58:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-13 09:44:55 +0200
commitfdef35f01e80df0b35bafc0faed285b3838474a8 (patch)
tree82ee835f4dbac7c04416ea2dc19972f9f9b0994b /comphelper
parentb33c175233ef6a9754fc4af647d82b9a51871a22 (diff)
loplugin:unodispose in comphelper
Change-Id: I0f23916204fd6d96b2b1641effe693cb0764f630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/SelectionMultiplex.cxx3
-rw-r--r--comphelper/source/misc/configuration.cxx1
-rw-r--r--comphelper/source/misc/instancelocker.cxx1
3 files changed, 5 insertions, 0 deletions
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx
index 438eaa80d718..37e4e30037b3 100644
--- a/comphelper/source/misc/SelectionMultiplex.cxx
+++ b/comphelper/source/misc/SelectionMultiplex.cxx
@@ -101,7 +101,10 @@ void OSelectionChangeMultiplexer::dispose()
{
Reference< XSelectionChangeListener> xPreventDelete(this);
if(m_xSet.is())
+ {
m_xSet->removeSelectionChangeListener(xPreventDelete);
+ m_xSet.clear();
+ }
}
osl_atomic_decrement(&m_refCount);
}
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index f4ee4e0298bb..2c99e64e46d9 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -295,6 +295,7 @@ void comphelper::ConfigurationListener::dispose()
listener->dispose();
}
maListeners.clear();
+ mxConfig.clear();
mbDisposed = true;
}
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 84c8054ecbb8..465cc5185834 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -216,6 +216,7 @@ void OLockListener::Dispose()
return;
auto xInstance = std::move(m_xInstance);
+ auto xApproval = std::move(m_xApproval);
auto nMode = m_nMode;
m_bDisposed = true;
aGuard.unlock();