WebApp Sec mailing list archives

RE: secure storage of sensitive data in J2EE


From: Michael Silk <michaelsilk () gmail com>
Date: Thu, 10 Feb 2005 10:16:48 +1100

Hi Randy,

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 :)

-- Michael


Current thread: