cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject Memory leak due to pooling
Date Fri, 09 Jan 2004 06:53:44 GMT
The last days showed that we have a lot of potential memory leaks,
see

[1] http://marc.theaimsgroup.com/?t=107330680600002&r=1&w=2
and

[2] http://marc.theaimsgroup.com/?t=107355695400003&r=1&w=2

This is caused by the simple fact that in some cases the recycle()
method of a Recyclable component is not called (see [2] for some
details about that).

Now, I see two solutions:
1) Ensure that recycle() is called by implementing Disposable() for
   each Recyclable component and call recycle() from there.
   This is a lot of hand work to do, but should work

2) Ensure that the container always calls recycle().

Now, obviously 2) is the easier solution as this should only be one
or two lines two write :)
But the problem is, that you Pooling (or Recyclable) is not guaranteed to
be available in every container and even if it is available you don't
know if the container pools your component (I think this is correct,
if not please correct me). So, theoretically 2) is not a solution.

Any other ideas?

Carsten 



Mime
View raw message