static MySingleton* getInstance(){ MySingleton* sin = instance.load(); if (!sin){ std::lock_guard myLock(myMutex); sin = instance.load(std::memory_order_relaxed); if(!sin){ sin = new MySingleton(); instance.store(sin); } } volatile int dummy{}; return sin; }