RecyclableList.RemoveBlock renamed to ReleaseBlock.
RecyclableList.Clear will no longer create new arrays. It will only release the array to the pool & decrease capacity. Fixed possibly infinite loop in Clear.
This commit is contained in:
1 parent
b3380b1f35
commit
576ac9ccfa
2 files changed
+21
-18
No files matched your search
@@ -47,7 +47,7 @@ namespace Recyclable.Collections
|
||||
{
|
||||
var toRemove = List[LongCount - 1];
|
||||
LongCount--;
|
||||
if (List.Capacity * _blockSize - LongCount == _blockSize)
|
||||
if ((List.Capacity * _blockSize) - LongCount == _blockSize)
|
||||
{
|
||||
List.RemoveBlock(List.BlockCount - 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user