summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-10-01 11:39:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-01 15:18:21 +0200
commitfc0cb364ae479ccb98e4c064da87ad151cdb5f39 (patch)
treed91943cb7044d576231aba9daf0776e48203ea00 /basctl
parent9939f5cbf044c7d671e7c9f55fa489e3e479f921 (diff)
create method for doing the "dispose-on-destruct"
which is (a) a little tricky and (b) needs to be on the base class to get the locking just right Change-Id: I425d4747e7e0ca0741fded9a6a70f6fa9995e102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/doceventnotifier.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx
index 9d408d7f967a..dfaa9eb13930 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -105,13 +105,7 @@ namespace basctl
DocumentEventNotifier::Impl::~Impl ()
{
- std::unique_lock aGuard(m_aMutex);
- if ( !impl_isDisposed_nothrow(aGuard) )
- {
- acquire();
- aGuard.unlock(); // dispose locks m_aMutex
- dispose();
- }
+ disposeOnDestruct();
}
void SAL_CALL DocumentEventNotifier::Impl::documentEventOccured( const DocumentEvent& _rEvent )