Using RapidXML I need to create and destroy a lot of XML nodes and XML attributes. I read in memory pool documentation that there is not a way to free a single string created in memory pool with allocate_string function.
But in this way size of memory pool will increase and it seems to me a problem not succeed in deleting strings linked to attributes or nodes no more in use.
My fear is to fill memory pool space with a too dynamic system in which I create and destroy a lot of nodes without a "a-priori" known schema.
Is there a way to skip this problem?
Added:
Reading documentation I found the memory_pool::set_allocator function and at first glance it seems to solve my question. I tried to use this function but I didn't succeed. Did anyone ever used the set_allocator function? I didn't find examples or references about on internet.