Can anyone explain to me what's happening here? Something about creating a anonymous function?
I also suspected the closure over the matrix argument as being the
root cause but was puzzled when using doseq instead made the problem
go away...
jvisualvm has an innocuous button called "Dump Memory" or something.
You'd expect it to write out a core dump or something, but actually it opens up a GUI which lets you interactively explore all of the objects on the heap. It is pretty amazing. Much better than jhat, which I've found to be really flakey.
Good for finding Classloader leaks too, or just generally finding where all your memory has gone via the Compute Retained Sizes option.
(defmacro transaction[& body]`(transaction* (fn [] ~@body)))I'm not sure how to avoid that. The anonymous function created here doesn't take parameters.