Companion

object Companion : RecordCompanion<HashTable, <Error class: unknown class>>

Functions

Link copied to clipboard
fun destroy(hashTable: HashTable)

Destroys all keys and values in the #GHashTable and decrements its reference count by 1. If keys and/or values are dynamically allocated, you should either free them first or create the #GHashTable with destroy notifiers using g_hash_table_new_full(). In the latter case the destroy functions you supplied will be called on all keys and values during the destruction phase.

Link copied to clipboard
fun newSimilar(otherHashTable: HashTable): HashTable

Creates a new #GHashTable like g_hash_table_new_full() with a reference count of 1.

Link copied to clipboard
fun removeAll(hashTable: HashTable)

Removes all keys and their associated values from a #GHashTable.

Link copied to clipboard
fun size(hashTable: HashTable): <Error class: unknown class>

Returns the number of elements contained in the #GHashTable.

Link copied to clipboard
fun stealAll(hashTable: HashTable)

Removes all keys and their associated values from a #GHashTable without calling the key and value destroy functions.

Link copied to clipboard
fun unref(hashTable: HashTable)

Atomically decrements the reference count of @hash_table by one. If the reference count drops to 0, all keys and values will be destroyed, and all memory allocated by the hash table is released. This function is MT-safe and may be called from any thread.

Link copied to clipboard
open override fun wrapRecordPointer(pointer: <Error class: unknown class><out <Error class: unknown class>>): HashTable

Wrap a CPointer pointing to a record of this type into its wrapper class.