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