apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: apr_pool_create_core_ex, WAS: Re: svn commit: r647384 - in /apr/apr/trunk: CHANGES include/apr_pools.h memory/unix/apr_pools.c
Date Tue, 08 Jul 2008 13:26:19 GMT
Mladen Turk wrote:
> 
> Again, the global allocator might get destroyed before the
> child pool since for it the owner is global pool.

Interesting observation, hinging on being a bug itself.

> Making sure that apr_terminate is called as last makes the need
> for tracking the child pools, and it breaks the OO language paradigm.
> The point is that one can call apr_terminate at some exit point, but
> that would require to wait for all objects to detach itself, and make
> event mechanism for breaking the long running functions (like file or
> network).

Nope.  As in most object paradigms, init/terminate is reference counted
and final destruction is held for refcount reaching zero.

Mime
View raw message