2 instantiations of ObjectPool
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Dependencies\PooledObjects\PooledStringBuilder.cs (1)
84
pool = new
ObjectPool
<PooledStringBuilder>(() => new PooledStringBuilder(pool!), size);
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\ArrayBuilder.cs (1)
19
private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = new
ObjectPool
<ArrayBuilder<T>>(() => new ArrayBuilder<T>(), 16);
7 references to ObjectPool
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (7)
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
122
internal ObjectPool(Func<
ObjectPool
<T>, T> factory, int size)
src\Dependencies\PooledObjects\PooledStringBuilder.cs (5)
21
private readonly
ObjectPool
<PooledStringBuilder> _pool;
23
private PooledStringBuilder(
ObjectPool
<PooledStringBuilder> pool)
73
private static readonly
ObjectPool
<PooledStringBuilder> s_poolInstance = CreatePool();
81
public static
ObjectPool
<PooledStringBuilder> CreatePool(int size = 32)
83
ObjectPool
<PooledStringBuilder>? pool = null;
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\ArrayBuilder.cs (1)
19
private static readonly
ObjectPool
<ArrayBuilder<T>> s_poolInstance = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(), 16);