1 instantiation of PooledStringBuilder
Microsoft.CodeAnalysis.PooledObjects.Package (1)
PooledStringBuilder.cs (1)
84
pool = new ObjectPool<PooledStringBuilder>(() => new
PooledStringBuilder
(pool!), size);
11 references to PooledStringBuilder
Microsoft.CodeAnalysis.Debugging.Package (2)
CustomDebugInfoReader.cs (2)
216
var
pooled = PooledStringBuilder.GetInstance();
246
var
pooledNameBuilder = PooledStringBuilder.GetInstance();
Microsoft.CodeAnalysis.PooledObjects.Package (9)
PooledStringBuilder.cs (9)
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;
84
pool = new ObjectPool<
PooledStringBuilder
>(() => new PooledStringBuilder(pool!), size);
88
public static
PooledStringBuilder
GetInstance()
90
var
builder = s_poolInstance.Allocate();
95
public static implicit operator StringBuilder(
PooledStringBuilder
obj)