I would like to take advantage of the following advertised feature of boost::fast_pool_allocator
(see the Boost documentation for Boost Pool):
By default pool uses the default_user_allocator_new_delete
allocator. This will destroy underlying objects by calling the destructor first and then reclaiming underlying memory. The default_user_allocator_malloc_free
will cause malloc'ed memory to be reclaimed without firing the destructor - hence drop[ing] them off into oblivion
.
That said, if your tree is really that complicated, using free instead of firing destructors seems like a really good way to start chopping branches out from under yourself and potentially start leaking memory you can no longer reach.