2 instantiations of ObjectPool
Microsoft.CodeAnalysis.InteractiveHost (2)
ArrayBuilder.cs (1)
426pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
PooledHashSet.cs (1)
35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128);
13 references to ObjectPool
Microsoft.CodeAnalysis.InteractiveHost (13)
ArrayBuilder.cs (7)
47private readonly ObjectPool<ArrayBuilder<T>>? _pool; 58private ArrayBuilder(ObjectPool<ArrayBuilder<T>> pool) 359var pool = _pool; 390private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = CreatePool(); 418public static ObjectPool<ArrayBuilder<T>> CreatePool() 423public static ObjectPool<ArrayBuilder<T>> CreatePool(int size) 425ObjectPool<ArrayBuilder<T>>? pool = null;
ObjectPool`1.cs (1)
118internal ObjectPool(Func<ObjectPool<T>, T> factory, int size)
PooledHashSet.cs (5)
14private readonly ObjectPool<PooledHashSet<T>> _pool; 16private PooledHashSet(ObjectPool<PooledHashSet<T>> pool, IEqualityComparer<T> equalityComparer) : 29private static readonly ObjectPool<PooledHashSet<T>> s_poolInstance = CreatePool(EqualityComparer<T>.Default); 32public static ObjectPool<PooledHashSet<T>> CreatePool(IEqualityComparer<T> equalityComparer) 34ObjectPool<PooledHashSet<T>>? pool = null;