
8 May
2012
8 May
'12
3:15 a.m.
I use boost::object_pool in my program, but I found some problems, it can not quit. Below is the code. Don't suggest me use boost::pool. The boost::pool is no problem, just discuss the boost::object_pool. Could anybody help me? #include <iostream> #include <boost/pool/object_pool.hpp> int main(void) { boost::object_pool<int> p; int count = 1000*1000; int** pv = new int*[count]; for (int i = 0; i < count; i++) pv[i] = p.construct(); for (int i = 0; i < count; i++) p.destroy(pv[i]); delete [] pv; return 0; } This program can not quit normally. Why? http://stackoverflow.com/questions/10491649/use-boostobject-pool-can-not-qui... -- Cheers & KaiWen