/// <summary> /// Disposer. Release resources and cleanup. /// </summary> /// <param name="disposing">true to dispose managed resources</param> protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!_disposed) { Log.Debug(); if (disposing) { if (_timer != null) { _timer.Dispose(); _timer = null; } if (_acceptTimer != null) { _acceptTimer.Stop(); _acceptTimer = null; } if (_audio != null) { _audio.Dispose(); _audio = null; } } // Release unmanaged resources. } _disposed = true; }
private void DestroyTimerQueue() { lock (_timerSyncRoot) _timerCompletionQueue.Clear(); Debug.Assert(TimerQueue != null); TimerQueue.Dispose(); TimerQueue = null; }