free_to_bytes


Description:

[ Version ( since = "2.32" ) ]
public static Bytes free_to_bytes (owned ByteArray array)

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

a ByteArray

Returns:

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