ByteArray.freeToBytes

Transfers the data from the glib.ByteArray into a new immutable glib.Bytes

The glib.ByteArray is freed unless the reference count of array is greater than one, the glib.ByteArray wrapper is preserved but the size of array will be set to zero.

This is identical to using Bytes.newTake and ByteArray.free together.

class ByteArray
freeToBytes
()

Return Value

Type: Bytes

a new immutable glib.Bytes representing same byte data that was in the array

Meta

Since

2.32