Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
RE: secure storage of sensitive data in J2EE
From: Michael Silk (michaelsilkgmail.com)
Date: Wed Feb 09 2005 - 17:16:48 CST
> I've always wondered what the point of a System.gc() was...
> what applications would calling System.gc() be useful if the
> JVM has the right to choose wether or not it gets called?
It's _hinting_ to the system that it might be appropriate to run gc
now. As for under what circumstances it might take notice, the java
documentation might help you more.
A useful scenario is if you are about to allocate a large amount of
memory, and you'd like to free up space from objects you declared
earlier (and out of scope).
> Does anyone know of an actual useful implementation of System.gc()?
Do you ever run out of memory in your java programs? (and it's not
your fault?) Then Sun's implementation is useful :)