diff options
author | thegeorg <[email protected]> | 2022-06-24 12:22:44 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2022-06-24 12:22:44 +0300 |
commit | ece86e83e77dcf3d9e757517d3d16f707272a4c7 (patch) | |
tree | 6366c9b5116ff7606a9706074bf4a7db0c17279c /util/system/atexit.cpp | |
parent | a4c1572074a6f4eb937168c283a61c43468d8650 (diff) |
Allow creating Singlelon during Singleton destruction back again
ref:53c837a1fa0289db60812b95b6ac96be23ae018d
Diffstat (limited to 'util/system/atexit.cpp')
-rw-r--r-- | util/system/atexit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/system/atexit.cpp b/util/system/atexit.cpp index 5ae7a21e233..7fafad95a6a 100644 --- a/util/system/atexit.cpp +++ b/util/system/atexit.cpp @@ -81,9 +81,10 @@ namespace { alignas(TAtExit) static char atExitMem[sizeof(TAtExit)]; static void OnExit() { - if (TAtExit* const atExit = atExitPtr.exchange(nullptr)) { + if (TAtExit* const atExit = atExitPtr.load()) { atExit->Finish(); atExit->~TAtExit(); + atExitPtr.store(nullptr); } } |