public void Deactivate(bool ignoreRefCount = false) { if (Interlocked.Decrement(ref refCount) == 0 || ignoreRefCount) { Interlocked.Exchange(ref activationHandle, Disposable.Empty).Dispose(); deactivated.OnNext(Unit.Default); } } }