|
Boost Users : |
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-01-17 15:58:17
Svaley Streasm wrote:
> I understand that shared_ptr uses the 'quick_allocator' when I compile
> the library with BOOST_SP_USE_QUICK_ALLOCATOR. But this means that I
> get the 'quick_allocator' working for every type that I use with
> shared_ptr, and this bothers me because this seems as a waste of
> memory for instances of classes that are not frequently used. Besides,
> the 'quick_allocator' unlike Scott Meyers suggestion (use a pool that
> can be destroyed) doesn't frees its free blocks which means that,
> shared_ptr of types that are used only in initialization stage will
> occupy memory which can not be recycled. Am I missing something?
I am quite sure that shared_ptr uses the quick_allocator only for the
reference count, not for the object itself, since it doesn't allocate that.
Sebastian Redl
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net