Reputation: 11
Under package io.netty.buffer
, there exists many types of ByteBuf
, such as PooledDirectByteBuf
, PooledHeapByteBuf
, UnpooledDirectByteBuf
, UnpooledHeapByteBuf
. Could anyone kindly explain their difference?
Upvotes: 1
Views: 1789
Reputation: 23567
Pooled ByteBuf are what they name says... They are pooled which means they are not released directly but pooled so they can be reused again. This is mainly useful as allocating and deallocating of direct ByteBuf is expensive.
Upvotes: 5