4 ms·
Well, you're not wrong, but I hate C++. With a passion.
by ghoward 4y ago
Well, you're not wrong, but I hate C++. With a passion.
- imron 4y agoI get where you're coming from - there are plenty of parts of C++ that I dislike also, but this kind of 'clean up on scope exit' has always been one of C++'s strengths - even before modern c++, and is significantly less error-prone than the solution you present above.