From 12c02f064db12d6d94063bf6dd9e4eb80f4252b8 Mon Sep 17 00:00:00 2001
From: LYW <leeyeanwoo@diteam.co.kr>
Date: 월, 11 10월 2021 15:30:00 +0900
Subject: [PATCH] Ongoing60 #3662 CF AOI Review 전설비 알람 발생 조치 - Review History File Mapping 해제 - Review Inner History 다운 현상 예외처리 추가 - Review End 시 Review 다운 현상 예외처리 추가

---
 ReviewHistory/ReveiwHistory/Singleton.h |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/ReviewHistory/ReveiwHistory/Singleton.h b/ReviewHistory/ReveiwHistory/Singleton.h
new file mode 100644
index 0000000..003088b
--- /dev/null
+++ b/ReviewHistory/ReveiwHistory/Singleton.h
@@ -0,0 +1,35 @@
+#pragma once
+
+template <typename T>
+class CSingleton
+{
+public:
+	CSingleton() {}
+	virtual ~CSingleton() {}
+
+	static void CreateClass()
+	{
+		if ( !m_pMgr )
+			m_pMgr = new T;
+	}
+
+	static void DestroyClass()
+	{
+		if ( m_pMgr )
+		{
+			delete m_pMgr;
+
+			m_pMgr = NULL;
+		}
+	}
+
+	static T* GetMgr()
+	{
+		return m_pMgr;
+	}
+
+private:
+	static T* m_pMgr;
+};
+
+template<typename T> T* CSingleton<T>::m_pMgr = NULL;
\ No newline at end of file

--
Gitblit v1.9.3