示例#1
0
        internal static ArrayPooledDuplicatedByteBuffer NewInstance(AbstractByteBuffer unwrapped, IByteBuffer wrapped, int readerIndex, int writerIndex)
        {
            ArrayPooledDuplicatedByteBuffer duplicate = Recycler.Take();

            _ = duplicate.Init <ArrayPooledDuplicatedByteBuffer>(unwrapped, wrapped, readerIndex, writerIndex, unwrapped.MaxCapacity);
            _ = duplicate.MarkReaderIndex();
            _ = duplicate.MarkWriterIndex();

            return(duplicate);
        }
示例#2
0
 public sealed override IByteBuffer RetainedDuplicate() => ArrayPooledDuplicatedByteBuffer.NewInstance(this, this, ReaderIndex, WriterIndex);
 public sealed override IByteBuffer RetainedDuplicate() => ArrayPooledDuplicatedByteBuffer.NewInstance(UnwrapCore(), this, Idx(ReaderIndex), Idx(WriterIndex));
 public override IByteBuffer RetainedDuplicate() => ArrayPooledDuplicatedByteBuffer.NewInstance(UnwrapCore(), this, ReaderIndex, WriterIndex);