apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: cvs commit: apr-util/include apr_buckets.h
Date Wed, 02 Jul 2003 06:37:58 GMT
On Tue, 1 Jul 2003, Greg Stein wrote:

> Eh? Why the flag? What is that for... doesn't the caller know when and if he
> should clean up? So there shouldn't be a need for a flag...

The caller knows.  But right now apr_buckets_alloc.c:alloc_cleanup() calls
apr_allocator_destroy(allocator) regardless of whether it "owns" the
allocator or not.

But I think this is irrelevant because I think there's an entirely cleaner
way to do this.  No flag, no extra API function.  Namely, we should just
have apr_bucket_alloc_create(apr_pool_t *p) {} use p's allocator always
(apr_pool_allocator_get(p)).  I think that will work fine and solve this
problem for good.  But I have to think about the ramifications.  From what
I've seen of the MPM's in looking through them just now, I think it will
be okay.  But I'll need to investigate further to be sure.

--Cliff

Mime
View raw message