Hey

I know that this is an old and a quite recurring issue here, but after spending some time going through the archives and googling around I'm still a bit confused.

The problem is relatively simple. I have a singleton class which takes a lot of time to initialize and I need to understand if that class is eligible for GC and, if so, when could that happen.

From what I've found, since java 1.2, a class may only be unloaded when it's class loader is reclaimed for GC. Is it possible for the class loader of a web application to be recycled for some reason (other than the web application being reloaded) ?

As a side question, if the singleton life cycle can not be easily controlled or known, what is the best way to perform an one-time expensive initialization?

Many thanks in advance

Tiago Matias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to