3 ms·
The caller still holds a pointer to the element and can free it. I would argue that delegating the responsibility of freeing the element to the caller is more p
by halomru 10y ago
The caller still holds a pointer to the element and can free it. I would argue that delegating the responsibility of freeing the element to the caller is more performant, since that allows the code to reuse that list element and insert it into a different (compatible) list.
That's the kind of performance/ease-of-use trade-off that sounds reasonable in an open source project with strict code reviews (but in very few other places)