clear

fun clear()

Empties the buffer for the next packet, releasing the backing array if this one grew past maxCapacity.

That release is the whole reason a cap exists: one oversized parameter would otherwise leave every later packet holding on to a buffer sized for it.