public static void Return(Utf8BufferTextWriter writer)
        {
            _cachedInstance = writer;

            writer._encoder.Reset();
            writer._memory       = Memory <byte> .Empty;
            writer._memoryUsed   = 0;
            writer._bufferWriter = null;

#if DEBUG
            writer._inUse = false;
#endif
        }
        public static Utf8BufferTextWriter Get(IBufferWriter <byte> bufferWriter)
        {
            var writer = _cachedInstance;

            if (writer == null)
            {
                writer = new Utf8BufferTextWriter();
            }

            // Taken off the the thread static
            _cachedInstance = null;
#if DEBUG
            if (writer._inUse)
            {
                throw new InvalidOperationException("The writer wasn't returned!");
            }

            writer._inUse = true;
#endif
            writer.SetWriter(bufferWriter);
            return(writer);
        }