Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 25677 invoked by uid 500); 12 Mar 2003 20:00:46 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 25654 invoked from network); 12 Mar 2003 20:00:45 -0000 Message-ID: <3E6F9130.2060407@algroup.co.uk> Date: Wed, 12 Mar 2003 19:57:36 +0000 From: Ben Laurie User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Cc: apr-cvs@apache.org Subject: Re: cvs commit: apr/include apr_pools.h References: <20030311200206.93320.qmail@icarus.apache.org> In-Reply-To: <20030311200206.93320.qmail@icarus.apache.org> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N striker@apache.org wrote: > striker 2003/03/11 12:02:06 > > Modified: include apr_pools.h > Log: > * include/apr_pools.h > > Add a comment about the order in which cleanups are run. This has been > the case for quite a while, but was never documented. ISTR Ben Hyde ranting to me about how this isn't strictly true... in particular, if you do this: 1. Register cleanup 1 in pool A 2. Make subpool B in A 3. Register cleanup 2 in B 4. Register cleanup 3 in A 5. Register cleanup 4 in B then destroy A, the order of cleanups is 3,4,2,1. It seems to me it would be good to fix this. Cheers, Ben. > > Revision Changes Path > 1.103 +3 -0 apr/include/apr_pools.h > > Index: apr_pools.h > =================================================================== > RCS file: /home/cvs/apr/include/apr_pools.h,v > retrieving revision 1.102 > retrieving revision 1.103 > diff -u -r1.102 -r1.103 > --- apr_pools.h 5 Mar 2003 21:22:26 -0000 1.102 > +++ apr_pools.h 11 Mar 2003 20:02:06 -0000 1.103 > @@ -529,6 +529,9 @@ > > /* > * Cleanup > + * > + * Cleanups are performed in the reverse order they were registered. That is: > + * Last In, First Out. > */ > > /** > > > > -- http://www.apache-ssl.org/ben.html http://www.thebunker.net/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff