diff --git a/Rx.NET/Source/System.Reactive.Linq/Reactive/Subjects/ReplaySubject.cs b/Rx.NET/Source/System.Reactive.Linq/Reactive/Subjects/ReplaySubject.cs index f3407f70da..5ddd2b2854 100644 --- a/Rx.NET/Source/System.Reactive.Linq/Reactive/Subjects/ReplaySubject.cs +++ b/Rx.NET/Source/System.Reactive.Linq/Reactive/Subjects/ReplaySubject.cs @@ -367,7 +367,6 @@ public IDisposable Subscribe(IObserver observer) var n = 0; - //var subscription = new Subscription(this, so); var subscription = new RemovableDisposable(this, so); lock (_gate) { @@ -416,18 +415,16 @@ public IDisposable Subscribe(IObserver observer) return subscription; } - //public void Unsubscribe(IObserver observer) - public void Unsubscribe(ScheduledObserver observer) + private void Unsubscribe(ScheduledObserver observer) { lock (_gate) { - //var so = (ScheduledObserver)observer; - //so.Dispose(); + observer.Dispose(); if (!_isDisposed) _observers = _observers.Remove(observer); } } - //public void Unsubscribe(IObserver observer) + void IReplaySubjectImplementation.Unsubscribe(IObserver observer) { var so = (ScheduledObserver)observer; @@ -464,7 +461,7 @@ public void Dispose() { _isDisposed = true; _observers = null; - //_queue.Clear(); + _queue.Clear(); } } }