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