Singleton Design Pattern with thread safety in C++