When does a class reload occur ?

When u update a JSP ?
When u update a class ?
When u update a lib ?
When u do reload in the manager webapps ? => yes :)

Anything else ?

-----Message d'origine-----
De : Christopher Schultz [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 5 novembre 2003 23:31
À : Tomcat Users List
Objet : Re: RE : memory-leaks in servlets, tool for tracing ?

Laurent,
> What about classes with static method and/or static attributes ?
> 
> Are they deleted from the old webapp ?

I don't believe that the VM ever releases resources taken up by Class 
objects (I think this includes static resources for a class). There used 
to be a VM option, -noclassgc, that was often used so that instance-less 
Classes wouldn't get GC'd. Almost everyone who ran Java apps turned that 
option on.

I'm not even sure if that option is still available. They may have 
simply eliminated the GC'ing of Class objects altogether.

I know that in my stock tc 4.1.27 on Sun's 1.4.2 VM, that after a 
re-load, all the old Class objects stick around. It's quite 
disconcerting because the heap grows by around 600 classes every time a 
context-reload occurs. The solution, of course, is not to enable 
context-reloading on production :)

-chris


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


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

Reply via email to