[cairo] deleting hash objects while iterating
keithp at keithp.com
Sun Apr 9 00:59:52 PDT 2006
I discovered that _cairo_hash_table_foreach walks over the hash table
without preventing it from being resized as a result of deletions
occuring from the callback.
Kinda nasty when you're trying to free everything from a hash table.
It was also easy to fix; just prevent the table from being resized while
iterating and clean it up after the iteration is completed.
Is this a reasonable thing to do?
shows the changes needed.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060409/5bff6134/attachment.pgp
More information about the cairo