Fix SharedSingleton to use memoryBarrier

This commit is contained in:
Vinnie Falco
2013-09-17 17:58:21 -07:00
parent f343941a96
commit 43ebbb1c70
3 changed files with 7 additions and 9 deletions

View File

@@ -92,6 +92,7 @@ public:
bassert (lifetime == SingletonLifetime::createOnDemand || ! staticData.destructorCalled);
staticData.instance = &staticData.object;
new (staticData.instance) SharedSingleton (lifetime);
memoryBarrier();
instance = staticData.instance;
}
}