Пример #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (_disposed)
     {
         return;
     }
     LeapC.DestroyClockRebaser(_rebaserHandle);
     _rebaserHandle = IntPtr.Zero;
     _disposed      = true;
 }
Пример #2
0
        /// <summary>
        /// Stops the connection for the existing instance of a Controller, clearing old
        /// policy flags and resetting the Controller to null.
        /// </summary>
        public void destroyController()
        {
            if (_leapController != null)
            {
                _leapController.StopConnection();
                _leapController.Dispose();
                _leapController = null;

#if SVR
                if (_clockRebaser != IntPtr.Zero)
                {
                    LeapC.DestroyClockRebaser(_clockRebaser);
                    _stopwatch.Stop();
                }
#endif
            }
        }