2 ms·
This isn't an inherent problem with RAII; it's a design/architecture problem. Not every object needs a destructor; if free() is a bottleneck, you have other ser
by KerrAvon 2y ago
This isn't an inherent problem with RAII; it's a design/architecture problem. Not every object needs a destructor; if free() is a bottleneck, you have other serious problems that you need to address.
Also, arena-type approaches aren't free; you can run into serious safety problems with a large object graph, because the pointers _will_ escape containment and become stale and you won't realize it.