24 references to SharedPools
Microsoft.CodeAnalysis.CodeStyle (24)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
55private static readonly ObjectPool<TAnalyzer> s_pool = SharedPools.Default<TAnalyzer>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeOrTokenExtensions.cs (1)
28using var pooledStack = SharedPools.Default<Stack<SyntaxNodeOrToken>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (1)
86using var pooledObject = SharedPools.Default<Stack<Node>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (1)
95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\StringBuilderPool.cs (3)
12=> SharedPools.Default<StringBuilder>().AllocateAndClear(); 15=> SharedPools.Default<StringBuilder>().ClearAndFree(builder); 19SharedPools.Default<StringBuilder>().ForgetTrackedObject(builder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (6)
61private static readonly ObjectPool<StaticLogMessage> s_pool = SharedPools.Default<StaticLogMessage>(); 89private static readonly ObjectPool<LazyLogMessage> s_pool = SharedPools.Default<LazyLogMessage>(); 119private static readonly ObjectPool<LazyLogMessage<TArg0>> s_pool = SharedPools.Default<LazyLogMessage<TArg0>>(); 152private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1>>(); 188private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1, TArg2>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1, TArg2>>(); 227private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1, TArg2, TArg3>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1, TArg2, TArg3>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
21= SharedPools.Default<Stack<(SyntaxNodeOrToken nodeOrToken, bool leading, bool trailing)>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
322private static readonly ObjectPool<SymbolKeyReader> s_readerPool = SharedPools.Default<SymbolKeyReader>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
56private static readonly ObjectPool<SymbolKeyWriter> s_writerPool = SharedPools.Default<SymbolKeyWriter>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (8)
20private const int ChunkSize = SharedPools.ByteBufferSize; 46var chunk = SharedPools.ByteArray.Allocate(); 85SharedPools.ByteArray.Free(chunks[c]); 261SharedPools.ByteArray.Free(chunk); 282: base(length: 0, chunks: SharedPools.BigDefault<List<byte[]>>().AllocateAndClear()) 314var chunk = SharedPools.ByteArray.Allocate(); 342SharedPools.ByteArray.Free(chunks[i]); 404SharedPools.BigDefault<List<byte[]>>().ClearAndFree(temp);