If you want to define this term like that, so be it.
There's often a bit of arbitrary in technical definitions, so
you can't argue too much---Leigh (and apparently Microsoft, at
least in some documents) define leak in their own way. The fact
that the definition is practically useless, and doesn't relate
to the non-technical sense, make me shy away from it.
[...]
Instead, the IMHO important property of a resource leak is
that resources are allocated and not used any more but also
not released.
That too, doesn't seem to relate to the non-technical meaning of
leak. If a boot leaks, it's not that a little bit of water has
gotten in, it's that water is continually entering. If
a program leaks memory, it's not that a little bit of memory is
not being freed, it's that memory is continually not being
freed.
Note that this has nothing to do with reachability. Memory can
leak even if it is reachable (which is why you can have memory
leaks in Java). With regards to your definition: if such memory
is to be used later, then you have a problem: your program
requires infinite memory in order to run.
I'll admit that my point of view is prejudiced by having worked
on a lot of long running (years) critical and semicritical
applications. Obviously, if you're not going to stop the
program, you really don't care about static destruction
. On
the other hand, even a small "leak" (as I define it) will
eventually cause the program to run out of memory.
With regards to Leigh's point of view: I don't consider it
a leak, because it's a one of, and not something continual.
Ideally, I'd like to see a destructor for each constructor, but
from a practical point of view, if the cost of doing so is
a possible order of destruction problem, then it's not worth it.
Engineering is a practical activity, involving trade-offs. In
this case, I prefer a program which is sure to work over one
which meets some abstract ideal (but can fail during shutdown).
But of course, instead of discussing the technical merits of the
various solutions, some people prefer to engage in name calling.