cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [Patch]: For possible memory leak
Date Thu, 24 Apr 2003 12:51:59 GMT
Carsten Ziegeler wrote:
> Hi,
> as Stephen has found out (thanks Stephen!) we have a memory leak with the Session and
> AuthenticationManager. This is a more general problem with RequestLifecycleComponents.
> They are currently never released :( 

With those RequestLifecycleComponents, it might be better to hack the
ECM to cache those with the request.  When the request is processed,
the token that encapsulates all RequestLifecycleComponents will call the
release() method on that.

There are a couple ways that can be done.  One of them is using CGLib
to create a MethodDelegate (MultiDelegate format).  Add an instance of
each RequestLifecycleComponent to the delegate and pass that delegate
from processor to processor.  The root processor will call the
Releaser.release() method on the delegate, and each and every
RequestLifecycleComponent will be released.

It would require a dependency on BCEL, but the generated delegate would
be generated only once and be very fast.  Not to mention, when you
upgrade to Fortress, you will also enjoy faster proxies.

"You know the world is going crazy when the best
rapper is a white guy, the best golfer is a black guy,
The Swiss hold the America's Cup, France is
accusing the US of arrogance, and Germany doesn't want
to go to war. And the 3 most powerful men in America
are named 'Bush', 'Dick', and 'Colon' (sic)".

-----Chris Rock

View raw message