Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 95700 invoked from network); 9 Jan 2004 06:52:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Jan 2004 06:52:36 -0000 Received: (qmail 22083 invoked by uid 500); 9 Jan 2004 06:52:12 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 21828 invoked by uid 500); 9 Jan 2004 06:52:10 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 21815 invoked from network); 9 Jan 2004 06:52:10 -0000 Received: from unknown (HELO mail.s-und-n.de) (212.8.217.2) by daedalus.apache.org with SMTP; 9 Jan 2004 06:52:10 -0000 Received: from notes.sundn.de (ntsrv5.sundn.de [10.10.2.10]) by mail.s-und-n.de (postfix) with ESMTP id 49A9519F55D for ; Fri, 9 Jan 2004 07:52:21 +0100 (CET) Received: from hw0386 ([10.10.2.46]) by notes.sundn.de (Lotus Domino Release 5.0.8) with SMTP id 2004010907522038:18187 ; Fri, 9 Jan 2004 07:52:20 +0100 From: "Carsten Ziegeler" To: "Cocoon-Dev" Subject: Memory leak due to pooling Date: Fri, 9 Jan 2004 07:53:44 +0100 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 09.01.2004 07:52:20, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 09.01.2004 07:52:21, Serialize complete at 09.01.2004 07:52:21 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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