Function

GLibHashTablesteal_all_values

since: 2.76

Declaration

GPtrArray*
g_hash_table_steal_all_values (
  GHashTable* hash_table
)

Description

Removes all keys and their associated values from a GHashTable without calling the value destroy functions, returning the values as a GPtrArray with the free func set to the hash_table value destroy function.

Available since: 2.76

This function is not directly available to language bindings.

Parameters

hash_table

Type: GHashTable

A GHashTable.

The data is owned by the caller of the function.

Return value

Type: An array of gpointer

A GPtrArray containing each value of the table. Unref with with g_ptr_array_unref() when done.

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