5 instantiations of ObjectPool
Test.Utilities (5)
ArrayBuilder.cs (1)
365
pool = new
ObjectPool
<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool), size);
PooledConcurrentDictionary.cs (1)
55
pool = new
ObjectPool
<PooledConcurrentDictionary<K, V>>(() =>
PooledDictionary.cs (1)
87
pool = new
ObjectPool
<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool, keyComparer), 128);
PooledHashSet.cs (1)
68
pool = new
ObjectPool
<PooledHashSet<T>>(() => new PooledHashSet<T>(pool, comparer), 128);
PooledSortedSet.cs (1)
49
pool = new
ObjectPool
<PooledSortedSet<T>>(
37 references to ObjectPool
Test.Utilities (37)
ArrayBuilder.cs (8)
50
private readonly
ObjectPool
<ArrayBuilder<T>>? _pool;
61
private ArrayBuilder(
ObjectPool
<ArrayBuilder<T>>? pool)
298
var
pool = _pool;
322
ObjectPool
<ArrayBuilder<T>>.ForgetTrackedObject(this);
329
private static readonly
ObjectPool
<ArrayBuilder<T>> s_poolInstance = CreatePool();
357
internal static
ObjectPool
<ArrayBuilder<T>> CreatePool()
362
internal static
ObjectPool
<ArrayBuilder<T>> CreatePool(int size)
364
ObjectPool
<ArrayBuilder<T>>? pool = null;
PooledConcurrentDictionary.cs (8)
19
private readonly
ObjectPool
<PooledConcurrentDictionary<K, V>>? _pool;
21
private PooledConcurrentDictionary(
ObjectPool
<PooledConcurrentDictionary<K, V>>? pool)
26
private PooledConcurrentDictionary(
ObjectPool
<PooledConcurrentDictionary<K, V>>? pool, IEqualityComparer<K> keyComparer)
48
private static readonly
ObjectPool
<PooledConcurrentDictionary<K, V>> s_poolInstance = CreatePool();
49
private static readonly ConcurrentDictionary<IEqualityComparer<K>,
ObjectPool
<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
52
public static
ObjectPool
<PooledConcurrentDictionary<K, V>> CreatePool(IEqualityComparer<K>? keyComparer = null)
54
ObjectPool
<PooledConcurrentDictionary<K, V>>? pool = null;
65
var
pool = keyComparer == null ?
PooledDictionary.cs (7)
19
private readonly
ObjectPool
<PooledDictionary<K, V>>? _pool;
21
private PooledDictionary(
ObjectPool
<PooledDictionary<K, V>>? pool, IEqualityComparer<K>? keyComparer)
79
private static readonly
ObjectPool
<PooledDictionary<K, V>> s_poolInstance = CreatePool();
80
private static readonly ConcurrentDictionary<IEqualityComparer<K>,
ObjectPool
<PooledDictionary<K, V>>> s_poolInstancesByComparer
84
public static
ObjectPool
<PooledDictionary<K, V>> CreatePool(IEqualityComparer<K>? keyComparer = null)
86
ObjectPool
<PooledDictionary<K, V>>? pool = null;
93
var
pool = keyComparer == null ?
PooledHashSet.cs (7)
17
private readonly
ObjectPool
<PooledHashSet<T>>? _pool;
19
private PooledHashSet(
ObjectPool
<PooledHashSet<T>>? pool, IEqualityComparer<T>? comparer)
61
private static readonly
ObjectPool
<PooledHashSet<T>> s_poolInstance = CreatePool();
62
private static readonly ConcurrentDictionary<IEqualityComparer<T>,
ObjectPool
<PooledHashSet<T>>> s_poolInstancesByComparer = new();
65
public static
ObjectPool
<PooledHashSet<T>> CreatePool(IEqualityComparer<T>? comparer = null)
67
ObjectPool
<PooledHashSet<T>>? pool = null;
74
var
pool = comparer == null ?
PooledSortedSet.cs (7)
19
private readonly
ObjectPool
<PooledSortedSet<T>>? _pool;
21
public PooledSortedSet(
ObjectPool
<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null)
43
private static readonly
ObjectPool
<PooledSortedSet<T>> s_poolInstance = CreatePool();
44
private static readonly ConcurrentDictionary<IComparer<T>,
ObjectPool
<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
46
private static
ObjectPool
<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null)
48
ObjectPool
<PooledSortedSet<T>>? pool = null;
62
var
pool = comparer == null ?