Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, but they have the same problem that they require compiler smarts; i.e., they require more than a template to implement shared_ptr<T>. When you're doing that, you may just as well implement something more sophisticated for automated memory management.

The attraction of RAII is that it's a pretty simple mechanism that doesn't require compiler intervention outside of basic, already existing optimizations such as inlining.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: