[shared_ptr] how does quick_allocator free its memory pool?

I am trying to enable BOOST_SP_USE_QUICK_ALLOCATOR while using shared_ptr, so to make shared_ptr to use quick_allocator to alloc/dealloc memory, But it seems that quick_allocator never free the memory pool (blocks) after my program exits, do I miss something? Or do I need extra step to use quick_allocator? I am using boost cvs head, vs2005, and disabled BOOST_HAS_THREADS (yes, for speed issue, same reason for using quick_allocator), vs2005.

gchen wrote:
I am trying to enable BOOST_SP_USE_QUICK_ALLOCATOR while using shared_ptr, so to make shared_ptr to use quick_allocator to alloc/dealloc memory,
But it seems that quick_allocator never free the memory pool (blocks) after my program exits, do I miss something?
It doesn't. After your program exits, all memory is automatically freed by the OS. There's no need to free it explicitly, except maybe to keep simplistic leak checkers happy.

Peter Dimov wrote:
gchen wrote:
But it seems that quick_allocator never free the memory pool (blocks) after my program exits, do I miss something?
It doesn't. After your program exits, all memory is automatically freed by the OS. There's no need to free it explicitly, except maybe to keep simplistic leak checkers happy.
OK, I see... Thanks for the quick reply.
participants (2)
-
gchen
-
Peter Dimov