Bug 11128 - memory leak
Summary: memory leak
Status: RESOLVED DUPLICATE of bug 20758
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 4.1.31
Hardware: All All
: P3 major with 3 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-24 13:39 UTC by Matthias Ernst
Modified: 2006-02-23 21:53 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Ernst 2002-07-24 13:39:13 UTC
After removing a web-app, the servlet context stays around, together with
all context attributes, etc.

My profiler shows static references from org.apache.naming.ContextBinding.

The reason is, that org.apache.catalina.StandardContext does the contextBinding
BEFORE the thread context classloader has been set, i.e. the classloader used as
key is NOT the web app classloader that is later used for unbind.

I propose moving #bindThread() directly after setting the loader.
Comment 1 Matthias Ernst 2002-07-24 14:28:22 UTC
Additionally, ContextBindings.unbindContext(this, this) must be called in #stop().
Also, JSPServlet should not create a DefaultLogger(servletContext) because that
context will also be held forever.

Cheers
Matthias
Comment 2 Tony Chao 2003-06-13 18:38:17 UTC
bug#20758 may be related (or the same)
Comment 3 Remy Maucherat 2003-06-14 07:50:57 UTC

*** This bug has been marked as a duplicate of 20758 ***