43 references to Allocate
Microsoft.CodeAnalysis.CodeStyle (43)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (6)
64=> fieldWrites.GetOrAdd(field, static _ => s_nodeSetPool.Allocate()).Add(location); 113var analysisResults = s_analysisResultPool.Allocate(); 118var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate(); 123var fieldReads = s_fieldToUsageLocationPool.Allocate(); 124var fieldWrites = s_fieldToUsageLocationPool.Allocate(); 128var fieldNames = _fieldNamesPool.Allocate();
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
58=> s_pool.Allocate();
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
68var instance = s_poolInstance.Allocate();
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
100return s_staticPool.Allocate();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
462var builder = s_poolInstance.Allocate();
src\Dependencies\PooledObjects\PooledDelegates.cs (1)
27var obj = DefaultDelegatePool<TPooled>.Instance.Allocate();
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
52var instance = s_poolInstance.Allocate();
src\Dependencies\PooledObjects\PooledHashSet.cs (1)
41var instance = s_poolInstance.Allocate();
src\Dependencies\PooledObjects\PooledStringBuilder.cs (1)
90var builder = s_poolInstance.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
35public static BasicBlockAnalysisData GetInstance() => s_pool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
41var visitor = s_visitorPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\NodeOperations.cs (4)
24public SegmentedList<IndentBlockOperation> IndentBlockOperation { get; } = s_indentBlockOperationPool.Allocate(); 25public SegmentedList<SuppressOperation> SuppressOperation { get; } = s_suppressOperationPool.Allocate(); 26public SegmentedList<AlignTokensOperation> AlignmentOperation { get; } = s_alignTokensOperationPool.Allocate(); 27public SegmentedList<AnchorIndentationOperation> AnchorIndentationOperations { get; } = s_anchorIndentationOperationPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (1)
23var block = s_pool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (6)
65var logMessage = s_pool.Allocate(); 95var logMessage = s_pool.Allocate(); 126var logMessage = s_pool.Allocate(); 160var logMessage = s_pool.Allocate(); 197var logMessage = s_pool.Allocate(); 237var logMessage = s_pool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (10)
91=> new(pool, p => p.Allocate(), (p, o) => p.Free(o)); 95var sb = pool.Allocate(); 103var set = pool.Allocate(); 111var set = pool.Allocate(); 119var set = pool.Allocate(); 127var set = pool.Allocate(); 135var set = pool.Allocate(); 144var map = pool.Allocate(); 152var list = pool.Allocate(); 160var list = pool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.ReaderReferenceMap.cs (1)
27=> new(s_objectListPool.Allocate());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.WriterReferenceMap.cs (1)
26_valueToIdMap = s_valueDictionaryPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
361var reader = s_readerPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
100var visitor = s_writerPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (2)
46var chunk = SharedPools.ByteArray.Allocate(); 314var chunk = SharedPools.ByteArray.Allocate();