3 ms·
> that your programmer always calls free at the exact moment that the memory is no longer needed I think this is not so unrealistic if you use RAII.
by whyever 8y ago
> that your programmer always calls free at the exact moment that the memory is no longer needed
I think this is not so unrealistic if you use RAII.
- naasking 8y agoEven then. There's nothing stopping you from placing a loop in the same scope as an object that's not used in or after the loop.
- pjmlp 8y agoHerb Sutter has a nice talk about how RAII can cause stack overflows or stop-the-world pauses if used badly. https://www.youtube.com/watch?v=JfmTagWcqoE https://www.youtube.com/watch?v=JfmTagWcqoE