thread/SafeSingleton: disallow copying
This commit is contained in:
parent
5544375002
commit
dbfc4abfd6
@ -58,6 +58,9 @@ public:
|
|||||||
delete std::exchange(instance, nullptr);
|
delete std::exchange(instance, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SafeSingleton(const SafeSingleton &) = delete;
|
||||||
|
SafeSingleton &operator=(const SafeSingleton &) = delete;
|
||||||
|
|
||||||
T *get() {
|
T *get() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user