using System.Text; namespace YKMoon { public static class StringBuilderPool { private static readonly ObjectPool pool = new ObjectPool(null, sb => sb.Clear()); public static StringBuilder Get() { return pool.Get(); } public static void Release(StringBuilder toRelease) { pool.Release(toRelease); } } }