ByteArray.free

Frees the memory allocated by the glib.ByteArray If free_segment is TRUE it frees the actual byte data. If the reference count of array is greater than one, the glib.ByteArray wrapper is preserved but the size of array will be set to zero.

class ByteArray
ubyte*
free

Parameters

freeSegment bool

if TRUE the actual byte data is freed as well

Return Value

Type: ubyte*

the element data if free_segment is FALSE, otherwise NULL. The element data should be freed using g_free().