### Function

# GLib PtrArray extend_and_steal

since: 2.62

#### Declaration

    void
    g_ptr_array_extend_and_steal (
      GPtrArray* array_to_extend,
      GPtrArray* array
    )

#### Description

Adds all the pointers in `array` to the end of `array_to_extend`, transferring ownership of each element from `array` to `array_to_extend` and modifying `array_to_extend` in-place. `array` is then freed.

As with g_ptr_array_free(), `array` will be destroyed if its reference count is 1. If its reference count is higher, it will be decremented and the length of `array` set to zero.

Available since: 2.62

This function is not directly available to language bindings.

#### Parameters

`array_to_extend`

  Type: An array of `gpointer`

  A `GPtrArray`.

  The data is owned by the caller of the function.

`array`

  Type: An array of `gpointer`

  A `GPtrArray` to add to the end of `array_to_extend`.

  The called function takes ownership of the data container, but not the data inside it.