Fixed problem with RecyclableList.RemoveAt returning to the pool always the same block
This commit is contained in:
1 parent
43c2c6f13a
commit
9db490d8e9
1 file changed
+1
-1
@@ -47,7 +47,7 @@ namespace Recyclable.Collections
|
|||||||
if ((list._capacity * blockSize) - oldCountMinus1 == blockSize)
|
if ((list._capacity * blockSize) - oldCountMinus1 == blockSize)
|
||||||
{
|
{
|
||||||
T[][] memoryBlocks = list._memoryBlocks;
|
T[][] memoryBlocks = list._memoryBlocks;
|
||||||
memoryBlocks[^1].ReturnToPool(_blockArrayPool);
|
memoryBlocks[list.BlockCount - 1].ReturnToPool(_blockArrayPool);
|
||||||
list._capacity -= blockSize;
|
list._capacity -= blockSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user