apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject SMS cleanup types, WAS: RE: cvs commit: apr/memory/unix apr_pools.c
Date Sun, 15 Jul 2001 17:07:42 GMT
> 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
> 
> 
> 

Mime
View raw message