The absolute easiest way to locate memory leaks is to use a tool like valgrind (Linux). I don't know of a Windows equivalent which is quite as easy, at least not a free one. The above will work if you're willing to make source code changes.