This commit is contained in:
hugy committed 2023-04-08 09:02:31 +08:00
1 parent 384aade1a8
commit bfe5b0ee12
82 files changed
+11652 -3978

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#ifndef WXHELPER_SINGLETON_H_
#define WXHELPER_SINGLETON_H_
template <typename T>
class Singleton {
protected:
Singleton() {}
~Singleton() {}
Singleton(const Singleton&) = delete;
Singleton& operator=(const Singleton&) = delete;
Singleton(Singleton&&) = delete;
Singleton& operator=(Singleton&&) = delete;
public:
static T& GetInstance() {
static T instance{};
return instance;
}
};
#endif