fast_pool_allocator question
Hi:
I try fast_pool_allocator and it does not release memory. See the following
program
Any ideas?
Thanks!
-Kawasaki
--- Begin ---
#include <vector>
#include
On Tue, Oct 7, 2008 at 12:58 AM, Ta-Cheng Lin
Hi:
I try fast_pool_allocator and it does not release memory. See the following program Any ideas?
<snip code> Well, this issue has come up before. I can tell you the reason, but I can't remember the solution. The reason is that the singleton instance you are calling release_memory() on is not the singleton the list is using to allocate nodes. Remember that std::list<int> will rebind the allocator to allocate SomeNodeStruct<int> instead of plain ints. As far as I know, there is not a portable way to get the type of "SomeNodeStruct". HTH, --Michael Fawcett
participants (2)
-
Michael Fawcett
-
Ta-Cheng Lin