nessos / Streams

A lightweight F#/C# library for efficient functional-style pipelines on streams of data.
http://nessos.github.io/Streams/
Other
381 stars 46 forks source link

Double disposal #33

Open dsyme opened 9 years ago

dsyme commented 9 years ago

While looking over the code I noticed this. There seems to be a double disposal here and here.

As far as I understand it, if the TryAdvance() returns false, then it is the responsibility of the owner of the iterator to then call Dispose() - the disposal shouldn't be called inside TryAdvance()

This is actually fixed in this work at this point by just deleting the disposal logic in the tryAdvance(), though it could be fixed directly instead.