3 ms·
After looking at this, honestly, you should just use C++.
by imron 4y ago
After looking at this, honestly, you should just use C++.
- ghoward 4y agoWell, 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.