16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
54
55
56
57
60 return GetLazy(Construct<T>).GetValue();
66 return GetLazy(
nullptr).Reset();
72 return GetLazy(Construct<T>).TryGetValue();
76 static TLazySingleton&
GetLazy(
void(*Constructor)(
void*))
78 static TLazySingleton Singleton(Constructor);
82 alignas(T)
unsigned char Data[
sizeof(T)];
92 Ptr = Constructor ? (T*)Data :
nullptr;
95#if (!defined(DISABLE_LAZY_SINGLETON_DESTRUCTION) || !DISABLE_LAZY_SINGLETON_DESTRUCTION)
static void Destruct(T *Instance)
static void Construct(void *Place)
TLazySingleton(void(*Constructor)(void *))
static TLazySingleton & GetLazy(void(*Constructor)(void *))
unsigned char Data[sizeof(T)]