diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index e76f857..379f30e 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -535,7 +535,8 @@ namespace Recyclable.Collections Clear(); if (_count is >= RecyclableDefaults.MinPooledArrayLength) { - _arrayPool.Return(_memoryBlock, NeedsClearing); + // If anything, it has been already cleared by .Clear(), Remove() or RemoveAt() methods, as the list was modified / disposed. + _arrayPool.Return(_memoryBlock, false); } } diff --git a/Recyclable.Collections/RecyclableLongList.cs b/Recyclable.Collections/RecyclableLongList.cs index 869f564..cf0d874 100644 --- a/Recyclable.Collections/RecyclableLongList.cs +++ b/Recyclable.Collections/RecyclableLongList.cs @@ -1302,7 +1302,8 @@ namespace Recyclable.Collections Clear(); if (_memoryBlocks.Length >= RecyclableDefaults.MinPooledArrayLength) { - _memoryBlocksPool.Return(_memoryBlocks, NeedsClearing); + // If anything, it has been already cleared by .Clear(), Remove() or RemoveAt() methods, as the list was modified / disposed. + _memoryBlocksPool.Return(_memoryBlocks, false); } }