ArrayG.sizedNew

Creates a new #GArray with @reserved_size elements preallocated and a reference count of 1. This avoids frequent reallocation, if you are going to add many elements to the array. Note however that the size of the array is still 0.

class ArrayG
static
sizedNew

Parameters

zeroTerminated bool

%TRUE if the array should have an extra element at the end with all bits cleared

clear bool

%TRUE if all bits in the array should be cleared to 0 on allocation

elementSize uint

size of each element in the array

reservedSize uint

number of elements preallocated

Return Value

Type: ArrayG

the new #GArray

Meta