Thanks! This is still driving me mad 'though. On Jul 27, 5:11 pm, Peter Schuller <peter.schul...@infidyne.com> wrote:
> The observations that the data structures are non-lazy still apply, > even if you could postpone the problem by increasing the heap size. Yes I can see that the sequence returned from str/split is not lazy. Nonetheless it is quite clear that my set-up is quite capable of keeping one, two or three of these fully realised sequences in memory without blowing up. The problem is that it is attempting to hold several. A number larger than one yet smaller than thirty-two. You're quite right, increasing the heap size has merely delayed the inevitable. > As for swank, I do believe it's keeping a history of return values > from previous commands in a variable whose name I forget. At least > that was the case when I was using Common Lisp; I'm not sure if > clojure-swank does the same. A common pitfall was exactly this; large > structures being retained in this history such that one perceived that > memory was apparently leaking. Swank does indeed keep the last three returned values (at least) in memory, under *1 *2 and *3. However I am generally careful not to return large values to the REPL. Quite apart from the memory issues, it takes an age to print them to screen. > the entire sequence being in memory. However, if you retain the head > of the sequence elsewhere, you will see the same effect. I don't think my function retains the head? Please correct me if I am wrong. A -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en