top | item 4385590

Do you understand the difference between retained and shallow heap in Java?

33 points| ivom2gi | 13 years ago |plumbr.eu

5 comments

order
[+] eswangren|13 years ago|reply
So, I thought the whole point of managed languages was to abstract this stuff away from the programmer. If I have to have a deep understanding of the JVM's implementation details to do anything non-trivial I may as well just stick with C. At least C makes it very clear as to what is going on.
[+] Nikem|13 years ago|reply
You haven't to have a deep understanding of the JVM's implementations to do non-trivial or even very complex applications in Java. You need that knowledge to solve problems.

And that is one of the problems of high-level languages: you can start knowing next to nothing. And go a long way too. But when you stumble upon a brick wall of a problem, you must go back and learn the basics.

[+] ExpiredLink|13 years ago|reply
> I thought the whole point of managed languages was to abstract this stuff away from the programmer.

It's a leaky abstraction.

[+] batista|13 years ago|reply
>If I have to have a deep understanding of the JVM's implementation details to do anything non-trivial I may as well just stick with C.

The difference is that you have to have a deep understanding of the details to do even trivial things in C.

So, no, one might not "just as well" stick with C. Except if you want to manage memory manually all the time, and dangle pointers around...