1 instantiation of PooledHashSet
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\PooledObjects\PooledHashSet.cs (1)
35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128);
12 references to PooledHashSet
Microsoft.CodeAnalysis.InteractiveHost (12)
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
668var set = PooledHashSet<T>.GetInstance(); 709var set = PooledHashSet<S>.GetInstance();
src\Dependencies\PooledObjects\PooledHashSet.cs (8)
14private readonly ObjectPool<PooledHashSet<T>> _pool; 16private PooledHashSet(ObjectPool<PooledHashSet<T>> pool, IEqualityComparer<T> equalityComparer) : 29private static readonly ObjectPool<PooledHashSet<T>> s_poolInstance = CreatePool(EqualityComparer<T>.Default); 32public static ObjectPool<PooledHashSet<T>> CreatePool(IEqualityComparer<T> equalityComparer) 34ObjectPool<PooledHashSet<T>>? pool = null; 35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128); 39public static PooledHashSet<T> GetInstance() 41var instance = s_poolInstance.Allocate();