reset

fun reset(zeroFillBuffers: Boolean, reuseFirst: Boolean)

Expert: Resets the pool to its initial state, while optionally reusing the first buffer. Buffers that are not reused are reclaimed by . Buffers can be filled with zeros before recycling them. This is useful if a slice pool works on top of this int pool and relies on the buffers being filled with zeros to find the non-zero end of slices.

Parameters

zeroFillBuffers

if true the buffers are filled with 0.

reuseFirst

if true the first buffer will be reused and calling is not needed after reset iff the block pool was used before ie. IntBlockPool.nextBuffer was called before.