Clojure - Test to ensure not holding onto head?
I am new to Clojure, and don't have a lot of Java experience.
I'm working on a system that is built around functions that transform one
or more input lazy sequences into a new lazy sequence. For example, a
function that takes two sequences and produces a lazy sequence of the
"diff" between the inputs.
In the test cases I verify that the sequences are realized? at the
appropriate time, but I can't figure out how to verify that I haven't
"held onto head" somewhere, other than to operate on a huge sequence and
wait for an OutOfMemoryError. I don't care for that approach, as "huge
sequence" is arbitrary and the tests take a long time to run.
I've looked for info about the Java Garbage Collector, but couldn't find
what I was looking for (or didn't understand it).
Suggestions?
No comments:
Post a Comment