logoalt Hacker News

MintPawyesterday at 3:24 AM1 replyview on HN

This is a general problem with destructors, you can't "batch delete" objects. To free a lot of stuff you're required to go pointer by pointer through the tree to clean up each object. To get real performance gains from pools you can't have per-object/subobject custom cleanup code.


Replies

aabhayyesterday at 5:32 AM

Not necessarily. Drop semantics are just syntactic sugar, and can thus be aggressively inlined or auto vectorized by the compiler.