
AMDG Christian Schladetsch wrote:
I also want to again raise the issue of boost::pool_allocator and boost::fast_pool_allocator leaking. AFAICT, when these are used with a system that rebind<>'s the allocator, it results in a persistent memory leak (unless you happen to know the new sizes of the allocations thence made).
I don't consider this an issue. All allocators with global state are going to have this problem. monotonic has a different form of the same problem. While in your test cases, it is safe to release the memory, in general, if you're using global storage it is not safe to release all the memory, because some other code might still be using it. I'll also point out that using singleton_pool::release_memory with fast_pool_allocator ends up violating the preconditions of pool::release_memory and therefore won't do any good. In addition, you are not even using the correct template parameters for the unrebound fast_pool_allocator when calling release_memory.
These allocators (on 1.38) also fail to compile when specialised over void on GCC. I'll supply a patch for that soon.
No need. https://svn.boost.org/trac/boost/changeset/49031 In Christ, Steven Watanabe