Has any expert say, at work, considered it otherwise? Note that the general response in the thread I linked to considered it proper practice.I don't know who has taught Ian that, but I don't consider it proper practice!
That we are usually concerned with portability here does not matter. Consider that I might use the arguments in this thread and start a thread in the FLTK mailing list. I certainly cannot say "since one of FLTK's goals is portability" since they would point out that "FLTK is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X".And what if this code is going to be ported to an OS which does not do this?
Since this is a forum that teaches portability, I would further argue that you clean up everything you use.
First, you have to establish that it is an excuse. Some of these FLTK users are saying that it is deliberate as a kind of optimisation.No excuses such as "the OS does it for me." Now that sounds like a VB programmer who does not declare variables before using them or just use variants for everything.
How is not calling destructors very bad practice if they have no side effect other than to free memory that would otherwise be freed by the OS just afterwards?Not calling destructors is very bad practice.
How does this matter if the program has exited?Calling the destructors but not freeing the actual objects is also bad programming practice since these objects will be left in a zombie state.