Dear all,<div><br></div><div>I am struggling to find the origin of a memory leak in a small program I wrote.</div><div>In order to help me searching, I would like to know a few details on the implementation of Racket.</div>
<div><br></div><div>1)</div><div>(define (f x y)</div><div> (lambda () x))</div><div>(define g (f 2 veryBigObject) )</div><div><br></div><div>Can I be sure that g does not retain a pointer to veryBigObject?</div><div><br>
</div><div><br></div><div>2) (g is a function)</div><div><br></div><div>(define (f)</div><div> (let ([x veryBigObject])</div><div> (g)))</div><div><br></div><div>Can I be sure that veryBigObject is not retained by f during the execution of g?</div>
<div><br></div><div>3) Same program.</div><div>g now captures its continuation. Can I be sure that this continuation does not retain veryBigObject?</div><div><br></div><div><br></div><div>Best regards,</div><div><br></div>
<div>Nicolas.</div><div> </div><div><br></div>