
Ed Singleton, 08.11.2013 12:35:
On 6 Nov 2013, at 19:35, Stefan Behnel wrote:
Ed Singleton, 06.11.2013 19:49:
On 6 Nov 2013, at 18:25, Stefan Behnel wrote: Would this be likely to cause a memory leak in non-threaded code?
I don't think so. Single-threaded code should always use the same (global) dictionary, so it can't leak memory more than once. The leak here seemed to be a couple of bytes per thread, that's so tiny that you wouldn't even notice it with only one thread.
No, I'm looking at an app that uses up 1GB of memory over 20,000 iterations, with about 100 xpaths per iteration, so it would need to be something bigger than that.
That sounds more like it's leaking entire subtrees. Try stripping the XPath queries from it completely to see if it's related to them at all. You could replace them by .find(), for example. Stefan