3 ms·
I'm always using this style because of much better readability. If I need some shared cleanup code when the function returns, I'm using some of the C++ scope-e
by albertzeyer 16y ago
I'm always using this style because of much better readability.
If I need some shared cleanup code when the function returns, I'm using some of the C++ scope-exit trick. Or in most cases, some of the predefined scope-exit handlers do just what I want. Like:
std::auto_ptr or boost::scoped_ptr
boost::shared_ptr
boost::interprocess::scoped_lock (or I have my own mutex scopedlock class)