Function

GLibPtrArraysteal_index_fast

since: 2.58

Declaration

gpointer
g_ptr_array_steal_index_fast (
  GPtrArray* array,
  guint index_
)

Description

Removes the pointer at the given index from the pointer array. The last element in the array is used to fill in the space, so this function does not preserve the order of the array. But it is faster than g_ptr_array_steal_index(). The GDestroyNotify for array is not called on the removed element; ownership is transferred to the caller of this function.

Available since: 2.58

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.
index_

Type: guint

The index of the pointer to steal.

Return value

Type: gpointer

The pointer which was removed.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.