ByteArray.freeToBytes

Transfers the data from the #GByteArray into a new immutable #GBytes.

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

This is identical to using g_bytes_new_take() and g_byte_array_free() together.

Return: a new immutable #GBytes representing same byte data that was in the array

class ByteArray
freeToBytes
()

Meta

Since

2.32