From dev-return-20781-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Fri Jul 18 10:35:36 2008 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 48913 invoked from network); 18 Jul 2008 10:35:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 10:35:36 -0000 Received: (qmail 3965 invoked by uid 500); 18 Jul 2008 10:35:34 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 3903 invoked by uid 500); 18 Jul 2008 10:35:34 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 3892 invoked by uid 99); 18 Jul 2008 10:35:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 03:35:34 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.191.128.81] (HELO mxout2.iskon.hr) (213.191.128.81) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 18 Jul 2008 10:34:39 +0000 Received: (qmail 25325 invoked from network); 18 Jul 2008 12:34:31 +0200 X-Remote-IP: 213.191.142.123 Received: from unknown (HELO mx.iskon.hr) (213.191.142.123) by mxout2.iskon.hr with SMTP; 18 Jul 2008 12:34:31 +0200 Received: (qmail 29562 invoked from network); 18 Jul 2008 12:34:31 +0200 X-AVScan: ClamAV X-Remote-IP: 89.164.41.60 Received: from 41-60.dsl.iskon.hr (HELO ?192.168.0.10?) (89.164.41.60) by mx.iskon.hr with SMTP; 18 Jul 2008 12:34:31 +0200 Message-ID: <488071B1.5080205@apache.org> Date: Fri, 18 Jul 2008 12:34:25 +0200 From: Mladen Turk User-Agent: Thunderbird 1.5.0.12 (X11/20071129) MIME-Version: 1.0 To: Bojan Smojver CC: dev@apr.apache.org Subject: Re: svn commit: r677505 - /apr/apr-util/trunk/misc/apr_reslist.c References: <20080717054557.AA2E02388A45@eris.apache.org> <20080717195057.213327svh8rbt1xc@www.rexursive.com> <487F1E0A.2040102@apache.org> <20080717212420.3879209jc5q4grmo@www.rexursive.com> <487F340D.8020600@apache.org> <1216344035.2754.11.camel@shrek.rexursive.com> <1216353712.2754.17.camel@shrek.rexursive.com> <48801B35.9090107@apache.org> <1216356687.2754.26.camel@shrek.rexursive.com> <1216360793.2754.29.camel@shrek.rexursive.com> <1216362614.2754.40.camel@shrek.rexursive.com> <1216375421.2754.42.camel@shrek.rexursive.com> In-Reply-To: <1216375421.2754.42.camel@shrek.rexursive.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Bojan Smojver wrote: > On Fri, 2008-07-18 at 16:30 +1000, Bojan Smojver wrote: >> *r=apr_pcalloc(rpool,sizeof(**r)); > > This should really be malloc()'ed and free in de(). > Of course if you can do that. However things like sockets and other APR objects depends on pools. With standard cleanup they'll be destroyed before de() is run. pre_cleanup address those things. It should be used in all cases where apr_object creates child pools. For example apr_memcache.c leeks memory because it doesn't call apr_pool_destroy in destructor although it creates one in constructor. (Probably because with standard cleanup it cores) Regards -- ^(TM)