16 references to ObjectPool
Microsoft.CodeAnalysis (16)
CodeGen\BasicBlock.cs (1)
59return new ObjectPool<BasicBlock>(() => new PooledBasicBlock(), size);
Diagnostic\DiagnosticBag.cs (1)
339return new ObjectPool<DiagnosticBag>(() => new DiagnosticBag(), size);
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
25new ObjectPool<AnalyzerDiagnosticReporter>(() => new AnalyzerDiagnosticReporter(), 10);
DocumentationCommentId.cs (1)
25: base(() => new List<T>(10), 10)
DocumentationComments\XmlDocumentationCommentTextReader.cs (1)
24new ObjectPool<XmlDocumentationCommentTextReader>(() => new XmlDocumentationCommentTextReader(), size: 2);
PEWriter\PooledBlobBuilder.cs (1)
20private static readonly ObjectPool<PooledBlobBuilder> s_chunkPool = new ObjectPool<PooledBlobBuilder>(() => new PooledBlobBuilder(PoolChunkSize), PoolSize);
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);
Syntax\SyntaxNavigator.cs (2)
93= new ObjectPool<Stack<ChildSyntaxList.Enumerator>>(() => new Stack<ChildSyntaxList.Enumerator>(), 10); 139= new ObjectPool<Stack<ChildSyntaxList.Reversed.Enumerator>>(() => new Stack<ChildSyntaxList.Reversed.Enumerator>(), 10);
Text\CompositeText.cs (1)
364= new ObjectPool<HashSet<SourceText>>(() => new HashSet<SourceText>(), 5);
Text\SourceText.cs (1)
33private static readonly ObjectPool<char[]> s_charArrayPool = new ObjectPool<char[]>(() => new char[CharBufferSize], CharBufferCount);