diff options
Diffstat (limited to 'Singleton/Singleton.cs')
-rw-r--r-- | Singleton/Singleton.cs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/Singleton/Singleton.cs b/Singleton/Singleton.cs deleted file mode 100644 index 4b5ae47..0000000 --- a/Singleton/Singleton.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Singleton -{ - class Singleton<T> where T : class, new() - { - private static T _instance; - - public static T Instance - { - get - { - if (_instance == null) - _instance = new T(); - return _instance; - } - } - - public static void Release() - { - if (_instance != null) - _instance = null; - } - } -} |