<div dir="ltr">Ah... classic rubber duck problem. As soon as I finished typing this up I thought ... &quot;maybe my home made debugger capturing the environment is never freeing the last capture?&quot;   and yup, that&#39;s what it was.  silly me. <div><br></div><div>I am, nonetheless, interested in the question... but much less urgently!</div><div><br></div><div>thx!</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Mar 16, 2026 at 11:09 AM Iain Duncan &lt;<a href="mailto:iainduncanlists@gmail.com">iainduncanlists@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Schemers, I have (in s7) created a (brute-force) backtracking constraint satisfaction solver for generating exercise melodies against a chord progression. It makes a big old recursive tree on each solve as it also tracks all the domain values possible at every node in order to take random walks through the problem space rather than just accepting the first good one. It&#39;s working well, except that I apparently have created a hell of a memory leak... when running in my web assembly project I hit an out of memory error after about 40 passes. Which is odd, because on each pass I make a whole new solver and search tree, so I guess somehow I am preventing the GC from cleaning up the previous ones.<div><br></div><div>I&#39;m just hoping to get any tips/tricks for chasing this kind of thing down, whether general lisp strategies or s7 specific tricks I could use!</div><div><br></div><div>BTW, Bill in my reading for this work (cope&#39;s &quot;Computers and Musical Style&quot; I came across a related citation to a paper of yours from 1989!  So if you have suggestions on good readings for this area of study, I&#39;m all ears. :-)</div><div><br></div><div>thanks!</div><div>iain</div></div>
</blockquote></div>