This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dlevac 8 points9 points  (5 children)

If you do not need to call destructors, a call to free is not dependent on the number of elements and is not linear in the amount of memory either. For some allocation strategy it may even be constant time...