[x] I have verified that I am running the latest version of DisposableFixer: 0.29
[x] I have searched open and closed issues to ensure it has not already been reported
Description
I declared a local variable in a Func that is used as return value. It is marked as not disposed local variable. But as return value, it should not marked as undisposed.
Source Code
DataRead = Observable.Create<byte[]>(observer => {
var cts = new CancellationTokenSource();
var cancel = cts.Token;
while (!cancel.IsCancellationRequested) {
var read_bytes = _stream.Read(buffer, 0, buffer.Length);
ThrowEndOfStreamExceotionIfNeeded(read_bytes);
var copy = new byte[read_bytes];
Array.Copy(buffer, 0, copy, 0, read_bytes);
}
return cts;
}).ObserveOn(_scheduler)
.Publish()
.RefCount();
Prerequisites
Description
I declared a local variable in a Func that is used as return value. It is marked as not disposed local variable. But as return value, it should not marked as undisposed.
Source Code
Screenshot