custom allocators, pool_alloc, more questions

I asked for explanation about custom allocators, but unfortunately the answers I got led to more questions which didn't get answered. Supposing a code block: { std::set<unsigned int, std::less<unsigned int>, boost::pool_allocator<unsigned int>> v; const int K = 10485750; for(int i=0; i<K; i++) { v.insert(i); } } //Does memory get released automatically here? or after the line: boost::singleton_pool<boost::pool_allocator_tag, sizeof(unsigned int)>::release_memory(); //what is release_memory() doing besides just setting the node type to a default? Why does that matter? Last, is the life of the singleton instance for the duration of program execution, or just the codeblock?
participants (1)
-
B Hart