소스 검색

Small memory optimization to Producer<T>.

Bart De Smet 10 년 전
부모
커밋
3ac2ca4344
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Rx.NET/Source/System.Reactive.Core/Reactive/Internal/Producer.cs

+ 1 - 1
Rx.NET/Source/System.Reactive.Core/Reactive/Internal/Producer.cs

@@ -45,7 +45,7 @@ namespace System.Reactive
             state.sink = new SingleAssignmentDisposable();
             state.subscription = new SingleAssignmentDisposable();
 
-            var d = new CompositeDisposable(2) { state.sink, state.subscription };
+            var d = StableCompositeDisposable.Create(state.sink, state.subscription);
 
             //
             // See AutoDetachObserver.cs for more information on the safeguarding requirement and