Relative Content

Tag Archive for c++boostboost-pool

Can boost pool work with virtual base classes? (tree-like use case)

I am implementing a tree like data structure with a node base class and multiple derived classes. I am looking for a memory pool to allocate the various derived nodes with, but also properly destructs all the allocated nodes (as in via their destructors). For context, at some point in the program I want to destroy all the trees I have created hence why I think a memory pool would be a good way to deallocate all memory at once.