ReusableStringBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a reusable StringBuilder. The StringBuilder is cleared after each cleanup to remove content from the previous usage.
public ref class ReusableStringBuilder sealed : Microsoft::VisualStudio::Utilities::ReusableResourceStore<System::Text::StringBuilder ^, int>
public ref class ReusableStringBuilder sealed : Microsoft::VisualStudio::Utilities::ReusableResourceStore<System::Text::StringBuilder ^, int>
class ReusableStringBuilder sealed : Microsoft::VisualStudio::Utilities::ReusableResourceStore<System::Text::StringBuilder, int>
public sealed class ReusableStringBuilder : Microsoft.VisualStudio.Utilities.ReusableResourceStore<System.Text.StringBuilder,int>
type ReusableStringBuilder = class
inherit ReusableResourceStore<StringBuilder, int>
Public NotInheritable Class ReusableStringBuilder
Inherits ReusableResourceStore(Of StringBuilder, Integer)
- Inheritance
-
ReusableStringBuilder
Constructors
ReusableStringBuilder(Int32) |
Initializes a new instance of ReusableStringBuilder with the specified cache capacity. |
Methods
Acquire(TConstructorParameter) |
Acquires a cached instance of the resource, or allocates a new instance if none are currently available. (Inherited from ReusableResourceStore<TResource,TConstructorParameter>) |
AcquireCore() |
Gets access to the resource stored by this object, and removes the resource so that subsequent callers cannot be handed the same resource at the same time. (Inherited from ReusableResourceStoreBase<TResource>) |
AcquireDefault(Int32) |
Gets the default ReusableStringBuilder. |
Allocate(TConstructorParameter) |
Allocates a new instance of the resource when one is not available in the cache. (Inherited from ReusableResourceStore<TResource,TConstructorParameter>) |
CanReuse(TResource, TConstructorParameter) |
Validates that an already-cached resource value is safe to reuse when Acquire is called. (Inherited from ReusableResourceStore<TResource,TConstructorParameter>) |
Cleanup(TResource) |
Immediately before releasing an object, performs cleanup on that object. This might be necessary to clean up state stored in the object to prevent leaking memory. (Inherited from ReusableResourceStoreBase<TResource>) |