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 535220
To read all comments associated with this story, please click here.
RE[5]: Memory management
by siride on Sat 15th Sep 2012 15:26 UTC in reply to "RE[4]: Memory management"
siride
Member since:
2006-01-02

I would imagine that setting to NULL is unnecessary, because static analysis can tell the JVM or compiler whether the variable is used any more, and if it's not, it can be GC'ed, whether it's set to NULL or not. Setting to NULL is only valuable in refcounted GC implementations, and neither Java nor .NET use such a scheme.

Reply Parent Score: 2