public void DisposeKillTimer() { if (KillTimer != null) { KillTimer.Dispose(); KillTimer = null; } }
public void DisposeKillTimer() { lock (_timerLock) { if (KillTimer != null) { KillTimer.Dispose(); KillTimer = null; } } }
/// <summary> /// Dispose all resources. /// </summary> /// <param name="disposing">Whether to dispose all resources.</param> protected virtual void Dispose(bool disposing) { if (disposing) { Process?.Dispose(); Process = null; KillTimer?.Dispose(); KillTimer = null; CancellationTokenSource?.Dispose(); CancellationTokenSource = null; TranscodingThrottler?.Dispose(); TranscodingThrottler = null; } }