diff --git a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs index b190a44..771b920 100644 --- a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs +++ b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs @@ -5,15 +5,15 @@ namespace LinkDotNet.StringBuilder; /// -/// Represents a string builder which tried to reduce as much allocations as possible. +/// A string builder which minimizes as many heap allocations as possible. /// /// -/// The is declared as ref struct which brings certain limitations with it. -/// You can only use it in another ref struct or as a local variable. +/// This is a ref struct which has certain limitations. You can only store it in a local variable or another ref struct.

+/// You should dispose it after use to ensure the rented buffer is returned to the array pool. ///
[StructLayout(LayoutKind.Sequential)] [SkipLocalsInit] -public ref partial struct ValueStringBuilder +public ref partial struct ValueStringBuilder : IDisposable { private int bufferPosition; private Span buffer; @@ -294,7 +294,7 @@ public readonly int LastIndexOf(ReadOnlySpan word, int startIndex) public readonly bool Equals(ReadOnlySpan span) => span.SequenceEqual(AsSpan()); /// - /// Disposes the instance and returns rented buffer from an array pool if needed. + /// Disposes the instance and returns the rented buffer to the array pool if needed. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Dispose()