My program, alas, has a memory leak somewhere, but I\'ll be damned if I know what it is.
Its job is to read in a bunch of ~2MB files, do some parsing and string repl
I use the dotTrace profiler for tracking down memory leaks. It's a lot more deterministic than methodological trial and error and turns up results a lot faster.
For any actions that the system performs, I take a snapshot then run a few iterations of the function, then take another snapshot. Comparing the two will show you all the objects that were created in between but were not freed. You can then see the stack frame at the point of their creation, and therefore work out what instances are not being freed.