>sometimes, deallocation of memory is much more expensive than simply exit
Good point. That could be problem if exiting the application is time critical. Finding errors and searching for memory leaks may also be expensive, and its really matter of how you set your priorities. For me, as a programmer, code-quality and bug detection/prevention is the top prio.
But of course I cant be too stubborn. If the exiting takes unreasonable (=it is a problem) long time due to deallocing and I can't solve that by restructuring the logic, then I guess I would skip the final deallocations. But (and this is my point) it would be a last resort and not something I'd do by default.
>There are no obscurities because they are virtual and exist as much as exist process
Im not sure I understand what you mean, but this is what I meant by "obscuring":
1) I assume we agree on that there are situations where you infact should deallocate (not necessarily talking about when exiting the application).
2) Should such deallocation not be executed I would like to be able to see that ASAP
3) If my application normally reports a whole bunch of memory leaks, chanches are high that I won't spot the above mentioned missing deallocation. Ie it is "obscured" as it is just one tree in a forest of reported memory leaks.
/Per
if (typos) cout << "My fingers are faster than my brain. Sorry for the typos.";