StringBuilderPool Class
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Provides a pool of StringBuilder instances to minimize memory allocations.
public class StringBuilderPool- Inheritance
- object
- StringBuilderPool
Constructors
| StringBuilderPool() | Initializes a new instance of the StringBuilderPool class with a default capacity. |
| StringBuilderPool(int) | Initializes a new instance of the StringBuilderPool class with a specified capacity. |
Fields
| Shared | The shared instance of the StringBuilderPool for global use. |
Properties
| Capacity | Gets the maximum number of StringBuilder instances in the pool. |
| Count | Gets the current number of StringBuilder instances in the pool. |
Methods
| Clear() | Clears all StringBuilder instances from the pool. |
| GetBuilder() | Acquires a StringBuilderPool.ReusableStringBuilder from the pool. |
| GetWriter() | Acquires a StringWriter that uses a pooled StringBuilder. |
| GetWriter(IFormatProvider) | Acquires a StringWriter that uses a pooled StringBuilder with a specified format provider. |
| Recycle(StringBuilder) | Returns a StringBuilder to the pool. |
