> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: [OT] tomcat 5.5.25 shared lib and sharing webapp jars > > One additional requirement: the java.lang.Class object itself must also > be unreachable.
True. > My direct experience that had led me to believe that > ClassLoaders keep lists of their loaded Classes is > that a WebappClassLoader held across a webapp restart > (due to inadequate cleanup by the webapp) results in > all Class objects loaded by that WebappClassLoader > staying in memory, essentially forever. I think you are correct about Tomcat's WebappClassLoader; it has to maintain the set of the classes it has loaded since it breaks the normal Java delegation rule, and can't simply ask its parent for the class. The JVM itself keeps track (outside of the heap) of all loaded classes so that classloaders that follow the standard delegation rule don't have to. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.