Nicolas Lehuen wrote: > OK, I'm currently checking in the fixes you suggested on the trunk. Too bad > we cannot write a unit test that checks for memory leaks.
I'm working on a test harness - Linux only at this point. I don't think it would be a good idea to incorporate it into the current unit tests as it may take many hours to run the full suite. It uses top and optionally pmap to get a detailed memory map so it should work on other *nixes, but I'm not sure how hard it would be to make it truly cross platform. I may drop the pmap option all together as it outputs more information than is really necessary, and top does the trick. Right now it does not use the unittest framework, but I think I'll change it to do so. Once I've cleaned up the code a little I'll make it publicly available. (Unless someone would like to play with the current hack - but it isn't pretty ;) ). Oh, and just in case there was any doubt, req_readlines, parse_qsl and cfgtree_walk do indeed leak memory. Jim