5 instantiations of ObjectPool
Roslyn.Diagnostics.Analyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (1)
367pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool), size);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
57pool = new ObjectPool<PooledConcurrentDictionary<K, V>>(() =>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
89pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool, keyComparer), 128);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledHashSet.cs (1)
70pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool, comparer), 128);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
51pool = new ObjectPool<PooledSortedSet<T>>(
37 references to ObjectPool
Roslyn.Diagnostics.Analyzers (37)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (8)
52private readonly ObjectPool<ArrayBuilder<T>>? _pool; 63private ArrayBuilder(ObjectPool<ArrayBuilder<T>>? pool) 300var pool = _pool; 324ObjectPool<ArrayBuilder<T>>.ForgetTrackedObject(this); 331private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = CreatePool(); 359internal static ObjectPool<ArrayBuilder<T>> CreatePool() 364internal static ObjectPool<ArrayBuilder<T>> CreatePool(int size) 366ObjectPool<ArrayBuilder<T>>? pool = null;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (8)
21private readonly ObjectPool<PooledConcurrentDictionary<K, V>>? _pool; 23private PooledConcurrentDictionary(ObjectPool<PooledConcurrentDictionary<K, V>>? pool) 28private PooledConcurrentDictionary(ObjectPool<PooledConcurrentDictionary<K, V>>? pool, IEqualityComparer<K> keyComparer) 50private static readonly ObjectPool<PooledConcurrentDictionary<K, V>> s_poolInstance = CreatePool(); 51private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new(); 54public static ObjectPool<PooledConcurrentDictionary<K, V>> CreatePool(IEqualityComparer<K>? keyComparer = null) 56ObjectPool<PooledConcurrentDictionary<K, V>>? pool = null; 67var pool = keyComparer == null ?
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (7)
21private readonly ObjectPool<PooledDictionary<K, V>>? _pool; 23private PooledDictionary(ObjectPool<PooledDictionary<K, V>>? pool, IEqualityComparer<K>? keyComparer) 81private static readonly ObjectPool<PooledDictionary<K, V>> s_poolInstance = CreatePool(); 82private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer 86public static ObjectPool<PooledDictionary<K, V>> CreatePool(IEqualityComparer<K>? keyComparer = null) 88ObjectPool<PooledDictionary<K, V>>? pool = null; 95var pool = keyComparer == null ?
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledHashSet.cs (7)
19private readonly ObjectPool<PooledHashSet<T>>? _pool; 21private PooledHashSet(ObjectPool<PooledHashSet<T>>? pool, IEqualityComparer<T>? comparer) 63private static readonly ObjectPool<PooledHashSet<T>> s_poolInstance = CreatePool(); 64private static readonly ConcurrentDictionary<IEqualityComparer<T>, ObjectPool<PooledHashSet<T>>> s_poolInstancesByComparer = new(); 67public static ObjectPool<PooledHashSet<T>> CreatePool(IEqualityComparer<T>? comparer = null) 69ObjectPool<PooledHashSet<T>>? pool = null; 76var pool = comparer == null ?
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (7)
21private readonly ObjectPool<PooledSortedSet<T>>? _pool; 23public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 45private static readonly ObjectPool<PooledSortedSet<T>> s_poolInstance = CreatePool(); 46private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 48private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 50ObjectPool<PooledSortedSet<T>>? pool = null; 64var pool = comparer == null ?