1 instantiation of PooledHashSet
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\PooledObjects\PooledHashSet.cs (1)
35
pool = new ObjectPool<PooledHashSet<T>>(() => new
PooledHashSet
<T>(pool!, equalityComparer), 128);
21 references to PooledHashSet
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (21)
MSBuild\ProjectFile\Extensions.cs (2)
39
using var _ =
PooledHashSet
<PackageReference>.GetInstance(out
var
references);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
988
var
set =
PooledHashSet
<T>.GetInstance();
1321
var
set =
PooledHashSet
<TElement>.GetInstance();
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();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledHashSet.cs (3)
11
public static PooledDisposer<
PooledHashSet
<T>> GetInstance(out
PooledHashSet
<T> instance)
14
return new PooledDisposer<
PooledHashSet
<T>>(instance);