13 references to ObjectPool
Microsoft.CodeAnalysis (13)
CommandLine\AnalyzerConfigSet.cs (3)
55
new
ObjectPool
<TreeOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, ReportDiagnostic>(Section.PropertiesKeyComparer));
58
new
ObjectPool
<AnalyzerOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, string>(Section.PropertiesKeyComparer));
60
private readonly ObjectPool<List<Section>> _sectionKeyPool = new
ObjectPool
<List<Section>>(() => new List<Section>());
InternalUtilities\BlobBuildingStream.cs (1)
20
private static readonly ObjectPool<BlobBuildingStream> s_pool = new
ObjectPool
<BlobBuildingStream>(() => new BlobBuildingStream());
ReferenceManager\CommonReferenceManager.Binding.cs (3)
19
new
ObjectPool
<MultiDictionary<string, (AssemblyData DefinitionData, int DefinitionIndex)>>(() => new MultiDictionary<string, (AssemblyData DefinitionData, int DefinitionIndex)>(AssemblyIdentityComparer.SimpleNameComparer));
723
private static readonly ObjectPool<Queue<AssemblyReferenceCandidate>> s_candidatesToExaminePool = new
ObjectPool
<Queue<AssemblyReferenceCandidate>>(() => new Queue<AssemblyReferenceCandidate>());
724
private static readonly ObjectPool<List<TAssemblySymbol?>> s_candidateReferencedSymbolsPool = new
ObjectPool
<List<TAssemblySymbol?>>(() => new List<TAssemblySymbol?>(capacity: 1024));
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
31
private static readonly ObjectPool<Stack<string>> s_stringStackPool = new
ObjectPool
<Stack<string>>(static () => new Stack<string>());
32
private static readonly ObjectPool<Stack<SyntaxNode>> s_nodeStackPool = new
ObjectPool
<Stack<SyntaxNode>>(static () => new Stack<SyntaxNode>());
Syntax\SyntaxNode.Iterators.cs (2)
47
private static readonly ObjectPool<ChildSyntaxList.Enumerator[]> s_stackPool = new
ObjectPool
<ChildSyntaxList.Enumerator[]>(() => new ChildSyntaxList.Enumerator[16]);
133
private static readonly ObjectPool<SyntaxTriviaList.Enumerator[]> s_stackPool = new
ObjectPool
<SyntaxTriviaList.Enumerator[]>(() => new SyntaxTriviaList.Enumerator[16]);
Syntax\SyntaxTriviaList.cs (1)
292
new
ObjectPool
<SyntaxTriviaListBuilder>(() => SyntaxTriviaListBuilder.Create());
Text\SourceText.cs (1)
34
private static readonly ObjectPool<XxHash128> s_contentHashPool = new
ObjectPool
<XxHash128>(() => new XxHash128());