1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
51
pool = new ObjectPool<PooledDictionary<K, V>>(() => new
PooledDictionary
<K, V>(pool!, keyComparer), 128);
11 references to PooledDictionary
Microsoft.CodeAnalysis.Debugging.Package (11)
src\Dependencies\PooledObjects\PooledDictionary.cs (11)
21
private readonly ObjectPool<
PooledDictionary
<K, V>> _pool;
23
private PooledDictionary(ObjectPool<
PooledDictionary
<K, V>> pool, IEqualityComparer<K> keyComparer)
45
private static readonly ObjectPool<
PooledDictionary
<K, V>> s_poolInstance = CreatePool(EqualityComparer<K>.Default);
48
public static ObjectPool<
PooledDictionary
<K, V>> CreatePool(IEqualityComparer<K> keyComparer)
50
ObjectPool<
PooledDictionary
<K, V>>? pool = null;
51
pool = new ObjectPool<
PooledDictionary
<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
55
public static
PooledDictionary
<K, V> GetInstance()
57
var
instance = s_poolInstance.Allocate();
63
public static PooledDisposer<
PooledDictionary
<K, V>> GetInstance(out
PooledDictionary
<K, V> instance)
66
return new PooledDisposer<
PooledDictionary
<K, V>>(instance);