Linked by Thom Holwerda on Fri 14th Sep 2012 02:30 UTC, submitted by MOS6510
Java "As a typical Java developer I never monitored the memory usage of my application apart from following typical best practices like closing the connections, streams etc. Recently we were struck with few issues in our JBoss servers that I had to dig in to the memory management."
Permalink for comment 535087
To read all comments associated with this story, please click here.
RE[3]: Memory management
by Brendan on Fri 14th Sep 2012 17:36 UTC in reply to "RE[2]: Memory management"
Brendan
Member since:
2005-11-16

"Techniques like recycling objects and using stack (to avoid the overhead of allocating and freeing heap) may never enter a Java developers' mind. Basic things (like setting references to null when the object they refer to is no longer needed) may never happen.


Don't do this!

These techniques used to be good up to Java 1.4 JVMs, but nowadays they do more harm than good to more modern GCs.
"

Would you mind elaborating? I can't see how these things can cause more harm than good (regardless of language or VM).

- Brendan

Reply Parent Score: 2