Tootaly free memory used by mem_chunk!!??
- From: "Mathieu LUGIEZ" <mathmath_07 hotmail com>
- To: gtk-devel-list gnome org
- Subject: Tootaly free memory used by mem_chunk!!??
- Date: Tue, 29 Mar 2005 19:02:19 +0200
Hello!!
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.
void
g_hash_table_totaly_destroy(GHashTable* hash_table)
{
g_hash_table_destroy(hash_table);
g_return_if_fail(node_mem_chunk != NULL);
g_mem_chunk_free(node_mem_chunk);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]