Sorry, I assumed you were going to use exceptions for your regular control flow, which is unnecessarily slow, produces extra code and makes your debugging experience a nightmare. Maybe you could show a little example to clarify, what you mean?
Reason for my vote of 2
While your code would look nice, performance would greatly suffer and there is no finally in C++. Cleanup should always be done in destructors.
Last Visit: 31-Dec-99 18:00 Last Update: 21-Sep-24 0:48