my company use tinyxml as xml parser, but sometimes memory leak happens,so I check the code, and found that when pushing 1000 request per second with 20 threads, each thread declare a TiXmlDocument, and do a Parse(char* some),
it work well at first , memory is ok, but somehow a suddem memory jump will happen in less than 3 hours.
So fact shows it is not thread safe. But I dont understand, how this happen? why memory leak? Usually being not thread safe means data-dirty, but why memory leak?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
my company use tinyxml as xml parser, but sometimes memory leak happens,so I check the code, and found that when pushing 1000 request per second with 20 threads, each thread declare a TiXmlDocument, and do a Parse(char* some),
it work well at first , memory is ok, but somehow a suddem memory jump will happen in less than 3 hours.
So fact shows it is not thread safe. But I dont understand, how this happen? why memory leak? Usually being not thread safe means data-dirty, but why memory leak?
Thanks