summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-16 09:04:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-16 08:25:29 +0000
commitbdfd8d5ab2c30b2c85bbf4354678d60811ae3998 (patch)
tree19f6978e757475d4086cacbc490b3e017801ed6b /include/comphelper
parent857b74041aa339e56ee8b2a05a910172753ed783 (diff)
no need to lock when accessing m_pInstance here
as noted by mkaganski, this field is valid until the object destructs, so no need to take a lock Change-Id: Id0b9a1a26391d4e971bd0b37b9d6e1b1a20e163a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/singletonref.hxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/comphelper/singletonref.hxx b/include/comphelper/singletonref.hxx
index 5e90fc78cdc1..7e9e85522562 100644
--- a/include/comphelper/singletonref.hxx
+++ b/include/comphelper/singletonref.hxx
@@ -125,7 +125,6 @@ public:
SingletonClass* operator->() const
{
// GLOBAL SAFE ->
- std::unique_lock aLock(SingletonRef::ownStaticLock());
return m_pInstance;
// <- GLOBAL SAFE
}
@@ -135,7 +134,6 @@ public:
SingletonClass& operator*() const
{
// GLOBAL SAFE ->
- std::unique_lock aLock(SingletonRef::ownStaticLock());
return *m_pInstance;
// <- GLOBAL SAFE
}