Bytes.take


Description:

public Bytes.take (owned uint8[]? data)

Creates a new Bytes from data.

After this call, data belongs to the Bytes and may no longer be modified by the caller. The memory of data has to be dynamically allocated and will eventually be freed with g_free.

For creating Bytes with memory from other allocators, see new_with_owner.

data may be null if data.length is 0.

Parameters:

data

the data to be used for the bytes

size

the size of data

Returns:

a new Bytes