Some issues request string builders with less memory allocations. See dotnet/corefx#13875 (comment) and https://github.com/dotnet/corefx/issues/13893
I suggest rewrite StringBuilder to use ArrayPool internal and also add next API to StringBuilder
public class StringBuilder
{
public string ToStringAndRelease(); // return result String and release buffers to ArrayPool
public string ToStringAndRelease(int index, int count); // return result String and release buffers to ArrayPool
}
Some issues request string builders with less memory allocations. See dotnet/corefx#13875 (comment) and https://github.com/dotnet/corefx/issues/13893
I suggest rewrite
StringBuilderto use ArrayPool internal and also add next API to StringBuilder