Wesley W. Garland wrote:

You know, all they'd need to do is overload the STL constructors to
use APR pools

Actually, it's the allocators that would have to be overridden, not the constructors. And you, as the user of the stahdard library, are free to override the allocators (both ::operator new and std::allocator used by containers).

instead of malloc and they'd be have a product I'd use
in a heartbeat.


Not that I can see how pools would be better for C++ object allocation... it sort of defeats the "resource allocation is construction" idea if your "freed" objects hang around in memory until you happen to clear a pool.

But then it wouldn't meet the ISO standard. Hmm...


In fact, the standard doesn't specify that ::operator new and friends should call malloc(). The library is free to use a different allocator.

-- Brane



Reply via email to