diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index e61bad4..e12fff9 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -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; } }