Function

GLibHashTableremove_all

Declaration

void
g_hash_table_remove_all (
  GHashTable* hash_table
)

Description

Removes all keys and their associated values from a GHashTable.

If the GHashTable was created using g_hash_table_new_full(), the keys and values are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself.

Available since:2.12

Parameters

hash_table

Type: GHashTable

A GHashTable.

The data is owned by the caller of the function.