Tootaly free memory used by mem_chunk!!??


I'm a french student so I want to prevent that my english is quite bad (Sorry)!!

I used glib for a C project based on HashTable.
I must totaly free all the dynamiquely allocated memory.
For test it I use the GMemVTable, but I realized that Glib doesn't free all memory used by mem_chunk when function like g_hash_table_destroy() is used. So I wrotte a personnal fuction in ghash.c to really free all the memory(at the end of the post).

My question is: Could you implement this type of function for the different basic types of Glib??
If the answer is no could you explain why?
Else I want help and work in this way.

g_hash_table_totaly_destroy(GHashTable* hash_table)
 g_return_if_fail(node_mem_chunk != NULL);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]