Function

GLibByteArraysteal

since: 2.64

Declaration [src]

guint8*
g_byte_array_steal (
  GByteArray* array,
  gsize* len
)

Description [src]

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.

Available since: 2.64

Parameters

array

Type: An array of guint8

A byte array.

The data is owned by the caller of the function.
len

Type: gsize*

The pointer to retrieve the number of elements of the original array.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: An array of guint8

The allocated element data.

The length of the array is in the len argument.
The caller of the function takes ownership of the data, and is responsible for freeing it.