3 ms·
Agreed. Sometimes, you don't even need RAII. You just let the stack unwind :) But yes, RAII can make it pretty braindead (which is good)
by banachtarski 11y ago
Agreed. Sometimes, you don't even need RAII. You just let the stack unwind :)
But yes, RAII can make it pretty braindead (which is good)
- TheLoneWolfling 11y agoOr arena allocation - which, by the way, is something I wish was more supported in mainstream languages
- PopeOfNope 11y agoDo you have any book suggestions for learning modern C++ memory management techniques? I'm beginning to think maybe it's time to fill that gap in my programming knowledge.
- banachtarski 11y agoHmm, modern C++ memory management is not entirely different from before. You have std::unique_ptr which is a game changer. I recommend just learning the language itself well. The C++ Primer (latest edition) plus Effective Modern C++ would be a good start. Also, read that doc floating around about everything a programmer needs to know about memory.