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

There are some non-defered reference counting that can offer pretty good performance(within 19% of defered reference counting), while still offering determinism[1].

[1]http://www.hpl.hp.com/personal/Pramod_Joisha/Publications/is...



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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: