Carsten Ziegeler wrote:
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.
Hmm.. it seems that the contract of the recycle() method wasn't clear or wasn't respected enough and this is a bug on our side (not Avalon). So reading your explanation I'm for solution 1) regardless of how much work it seems to be.
-- Giacomo Pati Otego AG, Switzerland - http://www.otego.com Orixo, the XML business alliance - http://www.orixo.com
