GLib.Array.sized_new
Description: Reference for GLib.Array.sized_new

### Function

# GLib Arraysized_new

#### Declaration [src]

    GArray*
    g_array_sized_new (
      gboolean zero_terminated,
      gboolean clear_,
      guint element_size,
      guint reserved_size
    )

#### Description [src]

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.

This function is not directly available to language bindings.

#### Parameters

`zero_terminated`

  Type: `gboolean`

  If true, the array should have an extra element at the end with all bits cleared.

`clear_`

  Type: `gboolean`

  If true, all bits in the array should be cleared to 0 on allocation.

`element_size`

  Type: `guint`

  The size of each element in the array.

`reserved_size`

  Type: `guint`

  The number of elements preallocated.

#### Return value

Type: An array of `gpointer`

The new `GArray`.

The caller of the function takes ownership of the data, and is responsible for freeing it.