Allow use after static destruction took place

This commit is contained in:
Alexey Rybalchenko
2019-01-17 13:37:59 +01:00
committed by Dennis Klein
parent 2d5dd004cb
commit 180acaae26
3 changed files with 93 additions and 74 deletions

View File

@@ -335,6 +335,10 @@ class Logger
virtual ~Logger() noexcept(false);
// protection for use after static destruction took place
static bool fIsDestructed;
static struct DestructionHelper { ~DestructionHelper() { Logger::fIsDestructed = true; }} fDestructionHelper;
private:
LogMetaData fMetaData;