1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.PooledObjects.Package (1)
8 references to PooledDictionary
Microsoft.CodeAnalysis.PooledObjects.Package (8)
PooledDictionary.cs (8)
16private readonly ObjectPool<PooledDictionary<K, V>> _pool;
18private PooledDictionary(ObjectPool<PooledDictionary<K, V>> pool, IEqualityComparer<K> keyComparer)
40private static readonly ObjectPool<PooledDictionary<K, V>> s_poolInstance = CreatePool(EqualityComparer<K>.Default);
43public static ObjectPool<PooledDictionary<K, V>> CreatePool(IEqualityComparer<K> keyComparer)
45ObjectPool<PooledDictionary<K, V>>? pool = null;
46pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
50public static PooledDictionary<K, V> GetInstance()
52var instance = s_poolInstance.Allocate();