ByteArray.take


Description:

[ Version ( since = "2.32" ) ]
public ByteArray.take (owned uint8[] data)

Creates a byte array containing the data.

After this call, data belongs to the `GByteArray` and may no longer be modified by the caller. The memory of data has to be dynamically allocated and will eventually be freed with [func@GLib.free].

Do not use it if data.length is greater than [`G_MAXUINT`](types.html#guint). `GByteArray` stores the length of its data in `guint`, which may be shorter than `gsize`.

Parameters:

data

the byte data for the array

len

the length of data

Returns:

The new `GByteArray`