[gambit-list] Wills from beyond.

Marc Feeley feeley at iro.umontreal.ca
Mon Dec 23 11:37:42 EST 2013

On Dec 23, 2013, at 11:10 AM, Estevo <euccastro at gmail.com> wrote:

> Thanks again Marc, this is great!  My misunderstanding was that I thought objects could be reclaimed anytime they are not _strongly_ reachable anymore.  I think this is how it works in Python (any use of weak references to reclaimed objects raises a ReferenceError).  Gambit's approach is indeed more powerful, and I can now see how it will simplify a problem I have.
> So just to confirm: inclusion of a will in the executable or nonexecutable will lists is/works like a weak reference, right?  In the example I gave before, w1 couldn't be reached weakly or strongly from the toplevel at the point its action procedure got executed.

Yes.  So to be clearer, Gambit’s runtime system keeps a weak reference to each will created with make-will.  The weak reference is severed when the will’s action procedure is executed, making the will unreachable.  This allows the will object itself to be reclaimed after the action procedure is executed.


More information about the Gambit-list mailing list