Пример #1
0
 public static void DestroySingleton()
 {
     lock (LockObject)
     {
         _instance.Dispose();
         _instance = null;
     }
 }
Пример #2
0
        public static I2CBus GetInstance()
        {
            lock (LockObject)
            {
                if (_instance == null)
                {
                    _instance = new I2CBus();
                }

                return(_instance);
            }
        }