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