diff options
author | chai <chaifix@163.com> | 2022-04-22 19:22:09 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-22 19:22:09 +0800 |
commit | c7de0419a8924ae7333bcaed39e797d7c9fc1e69 (patch) | |
tree | 7958bdb136a866dc2fc11d28d94bd10fb0d5b745 /AlienSurvival/Assets/Test/Scripts/TestSingleton.cs | |
parent | efa110ed3a787c460f5c5ae734a997860916fca5 (diff) |
* change folder of resources
Diffstat (limited to 'AlienSurvival/Assets/Test/Scripts/TestSingleton.cs')
-rw-r--r-- | AlienSurvival/Assets/Test/Scripts/TestSingleton.cs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/AlienSurvival/Assets/Test/Scripts/TestSingleton.cs b/AlienSurvival/Assets/Test/Scripts/TestSingleton.cs deleted file mode 100644 index d522653..0000000 --- a/AlienSurvival/Assets/Test/Scripts/TestSingleton.cs +++ /dev/null @@ -1,20 +0,0 @@ -public class TestSingleton<T> where T : class, new() -{ - private static T _instance; - private static readonly object syslock = new object(); - - public static T getInstance() - { - if (_instance == null) - { - lock (syslock) - { - if (_instance == null) - { - _instance = new T(); - } - } - } - return _instance; - } -}
\ No newline at end of file |