public static void ReturnBuffer(IJsonBufferPool <char> bufferPool, ref char[] buffer) { if (bufferPool == null) { buffer = null; return; } bufferPool.ReturnBuffer(ref buffer); }
public static void ReturnBuffer(IJsonBufferPool<char> bufferPool, ref char[] buffer) { if (bufferPool == null) { buffer = null; return; } bufferPool.ReturnBuffer(ref buffer); }
public static void EnsureBufferSize(IJsonBufferPool <char> bufferPool, int size, ref char[] buffer) { if (bufferPool == null) { buffer = new char[size]; return; } if (buffer != null) { bufferPool.ReturnBuffer(ref buffer); } buffer = bufferPool.RentBuffer(size); }
public static void EnsureBufferSize(IJsonBufferPool<char> bufferPool, int size, ref char[] buffer) { if (bufferPool == null) { buffer = new char[size]; return; } if (buffer != null) { bufferPool.ReturnBuffer(ref buffer); } buffer = bufferPool.RentBuffer(size); }