free_to_bytes
Description:
Transfers the data from the ByteArray into a new immutable Bytes.
The ByteArray is freed unless the reference count of array
is greater
than one, the ByteArray wrapper is preserved but the size of array
will
be set to zero.
This is identical to using Bytes.take and g_byte_array_free
together.
Parameters:
array |
Returns:
a new immutable Bytes representing same byte data that was in the array |