clear(minimumCapacity:)

Set both reader index and writer index to 0. This will reset the state of this ByteBuffer to the state of a freshly allocated one, if possible without allocations. This is the cheapest way to recycle a ByteBuffer for a new use-case.

ByteBuffer-core.swift:1013
mutating func clear(minimumCapacity: Int)

Parameters

minimumCapacity

The minimum capacity that will be (re)allocated for this buffer