ByteArray.sized


Description:

[ CCode ( cname = "g_byte_array_sized_new" ) ]
public ByteArray.sized (uint reserved_size)

Creates a new ByteArray with reserved_size bytes preallocated.

This avoids frequent reallocation, if you are going to add many bytes to the array. Note however that the size of the array is still 0.

Parameters:

reserved_size

number of bytes preallocated

Returns:

the new ByteArray