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.
Parameters
array: string|Uint8Array<ArrayBufferLike>
a byte array
free_segment: boolean
if true, the actual byte data is freed as well
Returns Uint8Array<ArrayBufferLike>
The allocated element data if free_segment is false, otherwise NULL.
Frees the memory allocated by the GLib.ByteArray. If
free_segmentis true it frees the actual byte data. If the reference count ofarrayis greater than one, the GLib.ByteArray wrapper is preserved but the size ofarraywill be set to zero.