protected virtual void Dispose(bool disposing) { if (_disposed) { return; } LeapC.DestroyClockRebaser(_rebaserHandle); _rebaserHandle = IntPtr.Zero; _disposed = true; }
/// <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 } }