### Function

# GLib Array new

#### Declaration

    GArray*
    g_array_new (
      gboolean zero_terminated,
      gboolean clear_,
      guint element_size
    )

#### Description

Creates a new `GArray` with a reference count of 1.

This function is not directly available to language bindings.

#### Parameters

`zero_terminated`

  Type: `gboolean`

  `TRUE` if the array should have an extra element at the end which is set to 0

`clear_`

  Type: `gboolean`

  `TRUE` if `GArray` elements should be automatically cleared to 0 when they are allocated.

`element_size`

  Type: `guint`

  The size of each element in bytes.

#### Return value

Type: An array of `gpointer`

The new `GArray`.

The data is owned by the called function.