FlatBuffers.ByteBuffer.Reset C# (CSharp) Method

Reset() public method

public Reset ( ) : void
return void
        public void Reset()
        {
            _pos = 0;
        }

Usage Example

Example #1
0
        public static void Dealloc(ref ByteBuffer buffer)
        {
            if (null == buffer)
            {
                return;
            }

            int size = buffer.Data.Length;

            if (0 == size || 0 != (size & (size - 1)))
            {
                return;
            }

            if (size > (1 << maxSizePOT))
            {
                return;
            }

            List <ByteBuffer> pool = sPool[sIndexLookup[size]];
            int slots = AvailableSlots(pool);

            if (slots < pool.Count)
            {
                buffer.Reset();
                pool[slots] = buffer;
                buffer      = null;
            }
        }
All Usage Examples Of FlatBuffers.ByteBuffer::Reset