Share via


StringBuilderPooledObjectPolicy Class

Definition

A policy for pooling StringBuilder instances.

public ref class StringBuilderPooledObjectPolicy : Microsoft::Extensions::ObjectPool::PooledObjectPolicy<System::Text::StringBuilder ^>
public class StringBuilderPooledObjectPolicy : Microsoft.Extensions.ObjectPool.PooledObjectPolicy<System.Text.StringBuilder>
type StringBuilderPooledObjectPolicy = class
    inherit PooledObjectPolicy<StringBuilder>
Public Class StringBuilderPooledObjectPolicy
Inherits PooledObjectPolicy(Of StringBuilder)
Inheritance
StringBuilderPooledObjectPolicy

Constructors

StringBuilderPooledObjectPolicy()

Properties

InitialCapacity

Gets or sets the initial capacity of pooled StringBuilder instances.

MaximumRetainedCapacity

Gets or sets the maximum value for Capacity that is allowed to be retained, when Return(StringBuilder) is invoked.

Methods

Create()

Creates a T.

Return(StringBuilder)

Runs some processing when an object is returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool.

Return(T)

Runs some processing when an object is returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool.

(Inherited from PooledObjectPolicy<T>)

Applies to