R
Roedy Green
Apart from the lack of connection from premise to conclusion, that's not
a fact, it's an excuse for sloppiness.
In java, memory leaks and packratting are quite different problems and
require quite different tools to detect them and quite different
solutions.
If you wished, you could make the same distinction in C++, but you
don't because the distinction does not matter so much for C++.
The point we Java folk make is that what we call memory leaks are
basically handled. They can't happen unless the JVM designer has blown
it.
There are a few packratting gotchas you have to specifically watch out
for. We have tools called profilers for detecting the others. Memory
allocation is generally not a problem except in very complex programs.
Nearly all of us Java folk came originally from a C++ background, so
there is no way on earth you will convince us that C++ memory
allocation is easier and more fool proof, especially when you don't
even claim to know Java.