Skip to content

Commit 0cb1f61

Browse files
Replaced Span<T>.Fill(0) with Span<T>.Clear()
Cf. dotnet/aspnetcore#20023 (comment)
1 parent 1c033bc commit 0cb1f61

File tree

1 file changed

+1
-1
lines changed
  • src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal

1 file changed

+1
-1
lines changed

src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ private void ClearReferences(int startIndex, int length)
447447
// If we store references, clear them to allow the objects to be GC'd.
448448
if (!IsValueTypeElement)
449449
{
450-
this.AvailableMemory.Span.Slice(startIndex, length).Fill(default);
450+
this.AvailableMemory.Span.Slice(startIndex, length).Clear();
451451
}
452452
}
453453
}

0 commit comments

Comments
 (0)