Re: Question About Hash



Thank you, Some code like this:

func1()
{
..
table_3= g_hash_table_new(g_direct_hash, g_direct_equal);
..
}
func2()
{
...
g_hash_table_insert(table_3, GUINT_TO_POINTER(key_3), value);
....
}
func3()
{
...
g_hash_table_foreach_remove(table_3, NULL, NULL);
g_hash_table_destroy(table_3);
...
}



2010/4/9 richard boaz <ivor boaz gmail com>
show your code, without it your comment is an opinion and not likely to get much of an interesting response.

why?  because there are multiple ways of setting up hash tables, their contents, and the automatic (or not) destroy functions which should be used.

try again,

richard

On Fri, Apr 9, 2010 at 12:03 PM, Tata <leleshan gmail com> wrote:
HELLO:

   When i destroy a GHashTable by g_hash_table_destroy, i found some memory leak. Hash func is g_direct_hash. Key equal func is g_direct_equal. There are more than 100,000 record in my GHashTable.

   Thanks.

Austin

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list





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