Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 71550 invoked by uid 500); 15 Jul 2001 16:57:48 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 71538 invoked from network); 15 Jul 2001 16:57:48 -0000 From: "Sander Striker" To: "Luke Kenneth Casson Leighton" Cc: Subject: SMS cleanup types, WAS: RE: cvs commit: apr/memory/unix apr_pools.c Date: Sun, 15 Jul 2001 19:07:42 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-to: <20010715183808.C10283@angua.rince.de> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > so.... you can... make your _own_ cleanup type? Yes. > say... a thread-ending-cleanup type? > you can you do per-type cleanupping? Yes. > then it will call the cleanups and only free [or > register for reuse in the free list, depends > on the sms instance implementation] areas of memory > registered by that type? Yes. > what happens when you destroy the sms? is _everything_ > cleanedup then? No, only the general cleanups are executed. The other cleanups are simply ignored. You are responsible for running cleanups of other types than ALL or GENERAL (I still need to patch up the ALL type, btw). I don't know if this will work, but you could register a cleanup function of type GENERAL that calls apr_sms_cleanup_run_type() on your sms... This is then executed on reset and/or destroy and in turn makes sure the cleanups of your type are executed. Sander > luke > > On Sun, Jul 15, 2001 at 12:51:11AM +0200, Sander Striker wrote: > > > Hi, > > > > > rbb 01/07/14 15:31:38 > > > > > > Modified: include apr_pools.h > > > memory/unix apr_pools.c > > > Log: > > > Add a new function to be able to cancel a child cleanup. This is > > > necessary for some other work I am doing. > > > > I wanted to open up the discussion on cleanups, but seeing this commit > > triggers me to do it now. > > > > In SMS we tried to make cleanups more generic. It isn't perfect yet, > > but there is a good starting point. What we basically want to do is > > register cleanups by type. This superseeds the concept of child and > > general cleanups, which are just types. Everything registered as > > general is cleaned up at reset and/or destroy. > > > > Can you please take a quick look at the sms cleanups and tell me > > what you think (as a starting point). > > > > Sander > > >