apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: RogueWave Standard C++ Library proposal in Incubator
Date Sun, 15 May 2005 19:31:39 GMT
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


Mime
View raw message