1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.Collections.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
49
pool = new ObjectPool<PooledDictionary<K, V>>(() => new
PooledDictionary
<K, V>(pool!, keyComparer), 128);
11 references to PooledDictionary
Microsoft.CodeAnalysis.Collections.Package (11)
src\Dependencies\PooledObjects\PooledDictionary.cs (11)
19
private readonly ObjectPool<
PooledDictionary
<K, V>> _pool;
21
private PooledDictionary(ObjectPool<
PooledDictionary
<K, V>> pool, IEqualityComparer<K> keyComparer)
43
private static readonly ObjectPool<
PooledDictionary
<K, V>> s_poolInstance = CreatePool(EqualityComparer<K>.Default);
46
public static ObjectPool<
PooledDictionary
<K, V>> CreatePool(IEqualityComparer<K> keyComparer)
48
ObjectPool<
PooledDictionary
<K, V>>? pool = null;
49
pool = new ObjectPool<
PooledDictionary
<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
53
public static
PooledDictionary
<K, V> GetInstance()
55
var
instance = s_poolInstance.Allocate();
61
public static PooledDisposer<
PooledDictionary
<K, V>> GetInstance(out
PooledDictionary
<K, V> instance)
64
return new PooledDisposer<
PooledDictionary
<K, V>>(instance);