<div dir="ltr">Ah, that's a valuable distinction.<div><br></div><div><br></div><div>FFI types have their release function called though, right?</div><div><br></div><div><br></div><div>Anyhow if any kind of cleanup is needed on termination (as in ,q etc.) I think there's some kind of termination handler in the manual so just use that then - thanks!</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-18 23:11 GMT+08:00 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Will executability is determined by the garbage collector.  When the Gambit process terminates the garbage collector is not called because this would take time and it is generally useless (the whole heap is reclaimed at once).<br>
<br>
So if you insist on the will executors to be called at the end of the program’s execution, you should call ##gc explicitly.  Note however that you may need to call ##gc more than once because a will’s executability may depend on the execution of another will.  So you’ll have to program the logic for this loop.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marc<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Dec 18, 2015, at 6:49 AM, Adam <<a href="mailto:adam.mlmb@gmail.com">adam.mlmb@gmail.com</a>> wrote:<br>
><br>
> Marc,<br>
><br>
> Is there an outer extent on wills' applicability - why don't the second two gsc runs say OUT on termination?<br>
><br>
> Thanks,<br>
> Adam<br>
><br>
><br>
> $ gsc<br>
> > (define a (box 1))<br>
> > (make-will a (lambda (v) (print "OUT.\n") (force-output)))<br>
> #<will #2><br>
> > (##gc)<br>
> > (set! a #f)<br>
> > (##gc)<br>
> OUT.<br>
> > ,q<br>
> $ gsc<br>
> > (define a (box 1))<br>
> > (make-will a (lambda (v) (print "OUT.\n") (force-output)))<br>
> #<will #2><br>
> > ,q<br>
> $ gsc<br>
> > (make-will (box 1) (lambda (v) (print "OUT.\n") (force-output)))<br>
> #<will #2><br>
> > ,q<br>
> $<br>
><br>
<br>
</div></div></blockquote></div><br></div>