[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 17 20:53:03 UTC 2021
sc/source/core/data/global.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit c5aef25352d20e052ec3a697f3cb979d3bbf9df6
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Sep 17 21:50:01 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Sep 17 22:52:27 2021 +0200
Use atomic::exchange when cleaning up
Change-Id: I77b8093efba3f3dfe96f6e3a4f4bfcc8dd89ccff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122273
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index cbc2bcec709d..e795912dd2e3 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -527,8 +527,8 @@ void ScGlobal::Clear()
ExitExternalFunc();
ClearAutoFormat();
xSearchItem.reset();
- delete pLegacyFuncCollection.load(); pLegacyFuncCollection = nullptr;
- delete pAddInCollection.load(); pAddInCollection = nullptr;
+ delete pLegacyFuncCollection.exchange(nullptr);
+ delete pAddInCollection.exchange(nullptr);
xUserList.reset();
xStarCalcFunctionList.reset(); // Destroy before ResMgr!
xStarCalcFunctionMgr.reset();
@@ -539,15 +539,15 @@ void ScGlobal::Clear()
xEmptyBrushItem.reset();
xButtonBrushItem.reset();
xEnglishFormatter.reset();
- delete pCaseTransliteration.load(); pCaseTransliteration = nullptr;
- delete pTransliteration.load(); pTransliteration = nullptr;
- delete pCaseCollator.load(); pCaseCollator = nullptr;
- delete pCollator.load(); pCollator = nullptr;
+ delete pCaseTransliteration.exchange(nullptr);
+ delete pTransliteration.exchange(nullptr);
+ delete pCaseCollator.exchange(nullptr);
+ delete pCollator.exchange(nullptr);
oCalendar.reset();
oSysLocale.reset();
- delete pLocale.load(); pLocale = nullptr;
+ delete pLocale.exchange(nullptr);
- delete pUnitConverter.load(); pUnitConverter = nullptr;
+ delete pUnitConverter.exchange(nullptr);
xFieldEditEngine.reset();
xDrawClipDocShellRef.clear();
More information about the Libreoffice-commits
mailing list