dev  

Re: Changing the order of cleanup for some core objects

Bojan Smojver
Mon, 21 Jul 2008 20:03:14 -0700

On Mon, 2008-07-21 at 17:00 -0700, Chris Darroch wrote:

>    I'm going to have to bow out here but I guess my main concern
> is that it's not unreasonable for developers to assume APR reslists
> and pools should play well together, and they really don't, at
> present -- you either have to resort to bare malloc()/free(),
> leak memory, or work around the cleanup order problem.

I absolutely agree with you that it is less than straightforward - it
certainly made me scratch my head for a while. In terms of mod_dbd,
malloc()/free() solution probably yields slightly lower memory use and
simpler code, but it's just another ugly hack.

Do you think apr_pool_destroy_safe() would help, as presented in the
last patch I sent to the list?

-- 
Bojan