On 14.02.2017 20:03, Matteo Bruni wrote:
I guess my remaining question is whether it makes sense to just introduce the _SAFE variant right away, in place of this one. If I'm not mistaken that would be a bit slower since you'd need to wine_rb_remove() the elements one by one before freeing them but it might be more "natural" in a way, since it would match the semantics of the list. I'm not opposed to this patch in any case.
I would prefer sticking with _DESTRUCTOR variant. It's both faster (O(n) vs O(n log n)) and makes implementing destructor slightly easier. It's not very strong opinion through.
Thanks, Jacek