Skip to content

Commit f585292

Browse files
committed
Fix reference clearing in Sequence<T>.Reset()
Fixes #182
1 parent 6808493 commit f585292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Nerdbank.Streams/Sequence`1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ internal void Assign(T[] array)
373373
/// </summary>
374374
internal void ResetMemory(ArrayPool<T> arrayPool)
375375
{
376-
this.ClearReferences(this.Start, this.End);
376+
this.ClearReferences(this.Start, this.End - this.Start);
377377
this.Memory = default;
378378
this.Next = null;
379379
this.RunningIndex = 0;

0 commit comments

Comments
 (0)