-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brian,
On 11/16/2010 10:42 AM, Brian wrote: > If I choose > the report of "Paths from GC roots" from it, I see LOTS of items! And all of > them have the "<loader> of" indication. All the items are classes programmed > by me, so I guess I'm guilty, and not the people that programmed Tomcat > ;-) . They are DTOs, facades, Struts actionforms, etc. > Why are all these classes in the list? If these are java.lang.Class objects, then you are looking at the list of classes loaded by the WebappClassLoader. These are the objects that make up the memory block that is unrecoverable. It's not the Class objects themselves that are holding onto references to the ClassLoader, it's the other way around. > What should I check about them? Why are they still loaded? The real problem is that there is an object that is still "live" somewhere whose Class has been loaded by your webapp's WebappClassLoader. > I guess there is something missing in my programming. Maybe I should do > something about all the objects that are still alive that correspond to all > the loaded classes? Maybe I need to do something in the "contextDestroyed()" > method in the ServletContextListener in my app, in order to destroy all the > objects properly? A basic rule is that anything you configure in a ServletContextListener's contextStarted method needs to be destroyed in the contextDestroyed method. Same thing for any Servlets that have init() methods -- use the destroy() method to clean-up those resources. When you undeploy, there may be a "leak" message in catalina.out. If you post that, we might be able to help you. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzi3KwACgkQ9CaO5/Lv0PC/AwCgg9xb+4vGGrhp1DCVVUDrj5fL 03sAoJ4WjGXllEuymrPPf3BpAXPyMGzI =VNNp -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org