I added the last Close Ref. because there is a buffer allocation on the ref. input of the Range node, I couldn't think of anything else to do to reduce memory usage, and the close seems to reduce (but not eliminate) memory leakage.
I have the invoke node in the loop to simulate a more complicated situation that seems to be leaking memory and I want to exaggerate problems here so I know what should and should not be done.
I also suspect that I don't really have a good way of checking for memory leaks. All I do is run the VI(s) and then watch Mem Usage for LabVIEW in my task manager. I see memory usage go up 1.M over about 70 minutes but it usually doesn't go up with other VIs.
Is Is there a better way? Should I make a build of this VI and then use software that finds memory leaks?