cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Re: [IMP] synchronization on session object in Cocoon
Date Thu, 12 May 2005 17:51:50 GMT
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


Mime
View raw message