Is there any possibility for tidylib (c++ api) to contain memory leaks due to repeted calls to tidyParseString ?. Any suggestion would be helpfull. I am developing an html indexer, and the parsing is done using html-tidy. The problem is some awfull memory leaks. As far as I could dig (valgrind), it seems that due to tidyParseString, huge amounts of memory are "still reachable" but never returned to the system (no or very little definitely lost memory). It causes my app to slow down from 0.1s/rec to 10s/rec or worse. Please advise, if you can, how to avoid this.