Linked by Thom Holwerda on Sat 8th Oct 2005 18:40 UTC, submitted by anonymous
Java Programmers agonize over whether to allocate on the stack or on the heap. Some people think garbage collection will never be as efficient as direct memory management, and others feel it is easier to clean up a mess in one big batch than to pick up individual pieces of dust throughout the day. This article pokes some holes in the oft-repeated performance myth of slow allocation in JVMs.
Thread beginning with comment 42030
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:

"Then, the program will crash if the JVM memory is too limited, but it'll also leave all that memory used when it isn't actually needed."

It is possible to force the garbage collector to run programatically with System.gc() if you want to programatically free up resources at some point.

Reply Parent Score: 1

Member since:

It only suggests the VM to collect, nothing more..

Reply Parent Score: 0