From: Nathan Myers (ncm_at_[hidden])
Date: 2000-05-14 17:46:35
on 5/14/00 8:03 AM, John Maddock at John_Maddock_at_[hidden] wrote:
> 3) The allocator requirements permit containers to allocate memory
> with one allocator and free with another un-related allocator (think
> of list::splice for example), in fact the lifetime of allocated
> memory can be independent of that of the allocator, I think this
> kind of usage would crash your allocators (due in part to #1)?
This is not correct. It allows you to deallocate memory using
any allocator that compares equal to the one you got it from.
If your allocator has per-object state, this can mean that you
can only deallocate using the original allocator or a copy of it.
Actually, the above describes allocator requirements before they
were weakened, but they describe how they will most likely later
be strengthened once the effects on list<>::splice etc. are worked
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk