ref removed. I seem to get better & more stable benchmarks without it.

This commit is contained in:
mlemanczyk committed 2023-01-27 23:32:28 +01:00
1 parent 4fcf3f2362
commit d4440134c8
1 file changed
+2 -1
+2 -1
View File
@@ -180,7 +180,7 @@ namespace Recyclable.Collections
protected long EnsureCapacity(in long requestedCapacity)
{
long oldCapacity = _capacity;
ref T[][] memory = ref _memoryBlocks;
T[][] memory = _memoryBlocks;
long newCapacity;
switch (oldCapacity > 0)
@@ -209,6 +209,7 @@ namespace Recyclable.Collections
newCapacity = memory.Length * blockSize;
_capacity = newCapacity;
_memoryBlocks = memory;
return newCapacity;
}