﻿#pragma once
#include <mutex>

class LockBasedSingleton
{
public:
	static LockBasedSingleton& getInstance();
	
	LockBasedSingleton(const LockBasedSingleton&) = delete;
	LockBasedSingleton& operator=(const LockBasedSingleton&) = delete;
private:
	LockBasedSingleton() = default;
	~LockBasedSingleton() = default;

	static std::mutex myMutex;
	static LockBasedSingleton* instance;
};
