Fixed problem with RecyclableList.RemoveAt returning to the pool always the same block

This commit is contained in:
mlemanczyk committed 2023-01-24 02:10:26 +01:00
1 parent 43c2c6f13a
commit 9db490d8e9
1 file changed
+1 -1
+1 -1
View File
@@ -47,7 +47,7 @@ namespace Recyclable.Collections
if ((list._capacity * blockSize) - oldCountMinus1 == blockSize)
{
T[][] memoryBlocks = list._memoryBlocks;
memoryBlocks[^1].ReturnToPool(_blockArrayPool);
memoryBlocks[list.BlockCount - 1].ReturnToPool(_blockArrayPool);
list._capacity -= blockSize;
}
}