Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add reference to BZ 53936 that proposes a workaround for classloader leaks caused by long-lived Exceptions


  • Anchor
    49159 - Improve ThreadLocal memory leak clean-up
  • Sun bug 4957990 - In some cases the Server JVM fails to collect classloaders. According to this page it should have been fixed with java 6u16 but actually it was not. It seems to be fixed with 6u21 (documented here and verified by the author of this wiki page).
  • Sun bug 6916498 - An exception can keep a classloader in memory if the stack trace that was recorded when it was created contains a reference to one of its classes. Some fixes have been made in tomcat Fixes were done in Tomcat for its own classes that had this issue (see BZ 50460), but some library or JRE code may still create a leak that is undetected by tools because of this JVM bug. See also BZ 53936 for a workaround that you can implement if you are unable to fix a buggy library.