<div dir="ltr">2013/7/17 Justin Lebar <span dir="ltr"><<a href="mailto:justin.lebar@gmail.com" target="_blank">justin.lebar@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Suppose function F contains two functions, f1, and f2, and suppose the<br>
set of variables touched by f1 is C1, and the set of variables touched<br>
by f2 is C2. Then so long as either f1 or f2 is alive, all variables<br>
in C1 union C2 are kept alive!<br><br>(...)<br><br>
The scheme under which f1 keeps alive only v1 and f2 keeps alive only<br>
v2 is called a "safe-for-space closure". It's apparently difficult to<br>
do right, so we shouldn't expect JS engines to do this anytime soon.<br>
See <a href="http://flint.cs.yale.edu/flint/publications/escc.html" target="_blank">http://flint.cs.yale.edu/flint/publications/escc.html</a>.<br></blockquote><div>Fascinating...<br></div><div>You say "JS engines". Have you noticed the same leak in other JS engines?<br>
<br></div><div>David<br></div></div></div></div>