MemoryBucket & OneSizeArrayPool made sealed for better performance.

This commit is contained in:
mlemanczyk committed 2023-07-03 01:26:14 +02:00
1 parent af8fef4e73
commit b1bcd8ea03
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
namespace Recyclable.Collections namespace Recyclable.Collections
{ {
internal class MemoryBucket<T> internal sealed class MemoryBucket<T>
{ {
public MemoryBucket(T[] memory, MemoryBucket<T> nextBucket) public MemoryBucket(T[] memory, MemoryBucket<T> nextBucket)
{ {
@@ -2,7 +2,7 @@
namespace Recyclable.Collections.Pools namespace Recyclable.Collections.Pools
{ {
public class OneSizeArrayPool<T> : ArrayPool<T> public sealed class OneSizeArrayPool<T>
{ {
private readonly int _blockSize; private readonly int _blockSize;
private readonly int _minBlockCount; private readonly int _minBlockCount;