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