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