new_with_owner
Description:
[ CCode ( cname = "g_bytes_new_with_free_func" , simple_generics = true ) ]
public static Bytes new_with_owner<T> (uint8[]? data, owned T owner = null)
public static Bytes new_with_owner<T> (uint8[]? data, owned T owner = null)
Creates a Bytes from data
.
When the last reference is dropped, free_func
will be called with the user_data
argument.
data
must not be modified after this call is made until free_func
has been called to indicate that the bytes is no
longer in use.
data
may be null if data.length
is 0.
Parameters:
data |
the data to be used for the bytes |
free_func |
the function to call to release the data |
size |
the size of |
user_data |
data to pass to |
Returns:
a new Bytes |