Nathaniel Alfred <Alfred.Nathaniel <at> swx.com> writes: > I think there is a memory leak in > http://svn.apache.org/viewcvs?rev=169806&view=rev. > There is a strong reference session.wrappedSession from value to key in > > // create new wrapper > session = new HttpSession(serverSession); > sessions.put(serverSession, session); > > which causes the WeakHashMap to keep the entries forever. > > See the Implementation Note in > http://java.sun.com/j2se/1.4.2/docs/api/java/util/WeakHashMap.html.
Ah, thanks. I did not have any experience with the different types of references - and though I read it before implementing I did not take care about exactly that case. Now it's fixed (and I hope I did not add a typo or so as I have no Java-understanding editor on this PC). Joerg
