public MemoryBlocks property added to allow more efficient use.

This commit is contained in:
mlemanczyk committed 2023-01-27 22:33:14 +01:00
1 parent c283cb562c
commit 4fcf3f2362
1 file changed
+3 -1
+3 -1
View File
@@ -14,7 +14,7 @@ namespace Recyclable.Collections
private int _blockSize;
private int _lastBlockIndex;
private int _lastItemIndex;
private int _lastItemIndex;
protected T[][] _memoryBlocks;
private long _capacity;
@@ -270,6 +270,8 @@ namespace Recyclable.Collections
set => new Span<T>(_memoryBlocks[index / _blockSize])[index % _blockSize] = value;
}
public T[][] MemoryBlocks { get => _memoryBlocks; }
public void Add(T item)
{
long requiredCapacity = _longCount + 1;