HashTable.this

Creates a new GHashTable like g_hash_table_new() with a reference count of 1 and allows to specify functions to free the memory allocated for the key and value that get called when removing the entry from the GHashTable.

  1. this(GHashTable* gHashTable)
  2. this(GHashFunc hashFunc, GEqualFunc keyEqualFunc)
  3. this(GHashFunc hashFunc, GEqualFunc keyEqualFunc, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc)

Parameters

hashFunc GHashFunc

a function to create a hash value from a key.

keyEqualFunc GEqualFunc

a function to check two keys for equality.

keyDestroyFunc GDestroyNotify

a function to free the memory allocated for the key used when removing the entry from the GHashTable or NULL if you don't want to supply such a function.

valueDestroyFunc GDestroyNotify

a function to free the memory allocated for the value used when removing the entry from the GHashTable or NULL if you don't want to supply such a function.

Throws

ConstructionException GTK+ fails to create the object.

Meta