comphelper/source/misc/SelectionMultiplex.cxx |    3 +++
 comphelper/source/misc/configuration.cxx      |    1 +
 comphelper/source/misc/instancelocker.cxx     |    1 +
 3 files changed, 5 insertions(+)

New commits:
commit fdef35f01e80df0b35bafc0faed285b3838474a8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Sep 12 14:58:11 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 13 09:44:55 2023 +0200

    loplugin:unodispose in comphelper
    
    Change-Id: I0f23916204fd6d96b2b1641effe693cb0764f630
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156848
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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();

Reply via email to