### Function

# GLib PtrArray unref

since: 2.22

#### Declaration

    void
    g_ptr_array_unref (
      GPtrArray* array
    )

#### Description

Atomically decrements the reference count of `array` by one. If the reference count drops to 0, the effect is the same as calling `g_ptr_array_free()` with `free_segment` set to `TRUE`. This function is thread-safe and may be called from any thread.

Available since: 2.22

This function is not directly available to language bindings.

#### Parameters

`array`

  Type: An array of `gpointer`

  A `GPtrArray`.

  The data is owned by the caller of the function.