I was making a class inherits ReactiveDictionary and when I inspect source of it, there is isDisposed.
[NonSerialized]
bool isDisposed = false;
and it's used to check if object is disposed.
public IObservable<Unit> ObserveReset()
{
if (isDisposed) return Observable.Empty<Unit>();
return collectionReset ?? (collectionReset = new Subject<Unit>());
}
However, Dispose() does not set this variable. In fact, it seems there's nowhere setting this variable.
There's disposedValue variable instead, and it reads as same role as isDisposed. but it's private and only used in Dispose().
I was making a class inherits
ReactiveDictionary
and when I inspect source of it, there isisDisposed
.and it's used to check if object is disposed.
However,
Dispose()
does not set this variable. In fact, it seems there's nowhere setting this variable. There'sdisposedValue
variable instead, and it reads as same role asisDisposed
. but it's private and only used inDispose()
.Is this intended or bug? I don't think it's intended, but if it is, it definitely needs some comment explains it.