19 references to new
Microsoft.CodeAnalysis.Features (2)
Completion\CompletionService_GetCompletions.cs (2)
346private static readonly ObjectPool<Dictionary<string, object>> s_uniqueSourcesPool = new(factory: () => new Dictionary<string, object>(), size: 5); 347private static readonly ObjectPool<List<CompletionItem>> s_sortListPool = new(factory: () => new List<CompletionItem>(), size: 5);
Microsoft.CodeAnalysis.Workspaces (17)
ExternalAccess\Pythia\Api\PythiaObjectPool.cs (1)
42public static readonly ObjectPool<T> Instance = new(() => new T(), 20);
J\s\src\Dependencies\PooledObjects\ArrayBuilder.cs\ArrayBuilder.cs (1)
426pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
J\s\src\Dependencies\PooledObjects\PooledDictionary.cs\PooledDictionary.cs (1)
46pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
J\s\src\Dependencies\PooledObjects\PooledHashSet.cs\PooledHashSet.cs (1)
35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128);
J\s\src\Dependencies\PooledObjects\PooledStringBuilder.cs\PooledStringBuilder.cs (1)
84pool = new ObjectPool<PooledStringBuilder>(() => new PooledStringBuilder(pool!), size);
Log\KeyValueLogMessage.cs (1)
20private static readonly ObjectPool<KeyValueLogMessage> s_pool = new(() => new KeyValueLogMessage(), 20);
Logger.LogBlock.cs (1)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256));
ObjectPool`1.cs (1)
108: this(factory, Environment.ProcessorCount * 2)
PooledDelegates.cs (1)
18public static readonly ObjectPool<T> Instance = new(() => new T(), 20);
SharedPools.cs (7)
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); 57public static readonly ObjectPool<char[]> CharArray = new(() => new char[ByteBufferSize], CharBufferCount); 68public static readonly ObjectPool<T> Instance = new(() => new T(), 100); 73public static readonly ObjectPool<T> Instance = new(() => new T(), 20); 79new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
Workspace\Solution\Checksum_Factory.cs (1)
23new(() => IncrementalHash.CreateHash(HashAlgorithmName.SHA256), size: 20);