12 references to ObjectPool
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
495
pool = new
ObjectPool
<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110
:
this
(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\PooledObjects\PooledDelegates.cs (1)
19
public static readonly ObjectPool<T> Instance =
new
(() => new T(), 20);
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
46
pool = new
ObjectPool
<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
src\Dependencies\PooledObjects\PooledHashSet.cs (1)
35
pool = new
ObjectPool
<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128);
src\Dependencies\PooledObjects\PooledStringBuilder.cs (1)
84
pool = new
ObjectPool
<PooledStringBuilder>(() => new PooledStringBuilder(pool!), size);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (6)
44
new
(() => new HashSet<string>(StringComparer.OrdinalIgnoreCase), 20);
50
new
(() => new HashSet<string>(StringComparer.Ordinal), 20);
56
public static readonly ObjectPool<byte[]> ByteArray =
new
(() => new byte[ByteBufferSize], ByteBufferCount);
64
public static readonly ObjectPool<T> Instance =
new
(() => new T(), 100);
69
public static readonly ObjectPool<T> Instance =
new
(() => new T(), 20);
75
new
(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);