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

It allows you to keep the cleanup next to the allocation/initialization, which is a nice organization. It's easy to ensure you haven't forgotten to clean something up in any exit path.

(Obviously, classic RAII has pretty much the same benefit. But it requires a whole class per type, whereas this approach has less boilerplate.)



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

Search: