Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

C++ sort-of guarantees that your objects' destructors will be called when they go out of scope.

So you can abuse this mechanic to 'register' things to be executed at the end of the current scope, almost no matter how you exit the current scope.



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

Search: