Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Singleton* Singleton::getInstance() {
- if (m_instance == nullptr) {
- std::lock_guard<std::mutex> lock(m_mutex);
- if (m_instance == nullptr) {
- m_instance = new Singleton();
- }
- }
- return m_instance;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement