Motivation: ByteBuf.readBytes(...) uses Unpooled.buffer(...) internally which will use a heap ByteBuf and also not able to make use of the allocator which may be pooled. We should better make use of the allocator. Modifications: Use the allocator for thenew buffer. Result: Take allocator into account when copy bytes. |
||
---|---|---|
.. | ||
main/java/io/netty/buffer | ||
test/java/io/netty/buffer |