The documentation for RapidXml says
Pool maintains RAPIDXML_STATIC_POOL_SIZE bytes of statically allocated memory. Until static memory is exhausted, no dynamic memory allocations are done. When static memory is exhausted, pool allocates additional blocks of memory of size RAPIDXML_DYNAMIC_POOL_SIZE each, by using global new[] and delete[] operators
I interpret this as: RapidXML uses a global memory pool. Are operations on the global memory pool thread safe? I.e. can I use several instances of RapidXML parser throughout my program without having to consider threading开发者_如何学C issues?
My interpretation was wrong. The "static memory pool" is an array that is placed on the stack. It is therefore not static as in C++ static array, but rather static as in "not dynamically allocated".
The conclusion: RapidXML does not share the memory pool between instances. The question is therefore invalid.
精彩评论