a pointer to the element data. The data may be moved as elements are added to the #GByteArray
the number of elements in the #GByteArray
Frees the memory allocated by the #GByteArray. If free_segment
is
%TRUE it frees the actual byte data. If the reference count of
array
is greater than one, the #GByteArray wrapper is preserved but
the size of array
will be set to zero.
a #GByteArray
if %TRUE the actual byte data is freed as well
Transfers the data from the #GByteArray into a new immutable #GBytes.
The #GByteArray is freed unless the reference count of array
is greater
than one, the #GByteArray wrapper is preserved but the size of array
will be set to zero.
This is identical to using g_bytes_new_take() and g_byte_array_free() together.
a #GByteArray
Creates a new #GByteArray with a reference count of 1.
Create byte array containing the data. The data will be owned by the array and will be freed with g_free(), i.e. it could be allocated using g_strdup().
Do not use it if len
is greater than %G_MAXUINT. #GByteArray
stores the length of its data in #guint, which may be shorter than
#gsize.
byte data for the array
Frees the data in the array and resets the size to zero, while the underlying array is preserved for use elsewhere and returned to the caller.
a #GByteArray.
Atomically decrements the reference count of array
by one. If the
reference count drops to 0, all memory allocated by the array is
released. This function is thread-safe and may be called from any
thread.
A #GByteArray
Contains the public fields of a GByteArray.