RecyclableList.SetNewLength fixed to properly initialize the list if the no. of memory blocks from array pool exceeds requested no.

This commit is contained in:
mlemanczyk committed 2023-03-26 23:22:32 +02:00
1 parent f231f7e0aa
commit c7052e778f
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -257,7 +257,7 @@ namespace Recyclable.Collections
}
localInts[uninitializedBlocksCount] = newMemoryBlocksSpan.Length;
if (localInts[uninitializedBlocksCount] == localInts[requiredBlockCount])
if (localInts[uninitializedBlocksCount] >= localInts[requiredBlockCount])
{
if (minBlockSize >= RecyclableDefaults.MinPooledArrayLength)
{