Finally, No
Why doesn’t C++ have a finally block? Here’s some Java. void userFunction() { f = new Resource(); f.open(); try { // might throw buffer = f.read(); } finally { f.close(); } useBuffer(buffer); } It’s tempting, after you’ve had a finally for a while to think that it’s necessary for proper resource management in the face… Read More »