#ifndef __SINGLETON_H
#define __SINGLETON_H
#pragma warning(push)
#pragma warning(disable:4251)
#include"afxmt.h"
#include <memory>
class Singleton
{
static std::auto_ptr<Singleton> m_pInstance;
protected:
Singleton(){};
//static std::mutex m_Mutex;
static CMutex m_Mutex;
public:
~Singleton(){}
//Return this singleton class' instance pointer
static Singleton* Instance()
{
if(NULL == m_pInstance.get())
#define __SINGLETON_H
#pragma warning(push)
#pragma warning(disable:4251)
#include"afxmt.h"
#include <memory>
class Singleton
{
static std::auto_ptr<Singleton> m_pInstance;
protected:
Singleton(){};
//static std::mutex m_Mutex;
static CMutex m_Mutex;
public:
~Singleton(){}
//Return this singleton class' instance pointer
static Singleton* Instance()
{
if(NULL == m_pInstance.get())