19 references to new
Microsoft.CodeAnalysis.Workspaces (19)
ExternalAccess\Pythia\Api\PythiaObjectPool.cs (1)
42
public static readonly ObjectPool<T> Instance =
new
(() => new T(), 20);
Log\KeyValueLogMessage.cs (1)
20
private static readonly ObjectPool<KeyValueLogMessage> s_pool =
new
(() => new KeyValueLogMessage(), 20);
Shared\Extensions\SourceTextExtensions.cs (1)
33
private static readonly ObjectPool<char[]> s_charArrayPool =
new
(() => new char[CharArrayLength], ObjectPoolCount);
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\Collections\IntervalTreeHelpers.cs (1)
37
private static readonly ObjectPool<Stack<TNode>> s_nodeStackPool =
new
(() => new(), 128, trimOnFree: false);
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);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
27
public static ObjectPool<T[]> Shared =
new
(() => new T[BufferSize], 512);
Workspace\Solution\Checksum_Factory.cs (1)
24
new
(() => new(), size: 20);
Workspace\Solution\ProjectDependencyGraph.cs (1)
60
private static readonly ObjectPool<ImmutableHashSet<ProjectId>.Builder> s_reverseReferencesBuilderPool =
new
(static () => ImmutableHashSet.CreateBuilder<ProjectId>(), size: 256);