transfer

fun transfer(newByteLength: Int): ArrayBuffer(source)

Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.

MDN