Search code examples
chashtableglib

In Glib 1.2 is it safe to remove items from a hashtable while using g_hash_table_foreach?


When using GLib 1.2's GHashTable with the g_hash_table_foreach() method, is it safe to remove items using the g_hash_table_remove() method?

I know that Glib 2.0 provides the g_hash_table_foreach_steal() method, but we're stuck with 1.2 for our build at work.


Solution

  • Well it's not allowed in the current API, so I'd be really surprised if that functionality was there in 1.2.