[gambit-list] A weak-reference box object possible?
adam.mlmb at gmail.com
Sun Jun 11 05:00:20 EDT 2017
I realize that Gambit delivers weak references only through hashtables and
I suspect a weakly referenced box, i.e. a will object without action, would
Do will objects have any overhead due to the action.. I would guess so, or
is it so small that users implementing a weakly referenced box themselves
by (define (make-weak-box v) (make-will v (lambda (v) #!void))), would
always be a clean solution?
I recall that will objects take extra time during some GC phase, actually
extend the STW, so that's part why I wanted to ask this question.
Also I brought this up as the absence of a "simple" weak reference box
object appeared a bit assymetric to me, e.g., what about the cases where
you want an object reference but want it to be weak, and are fine with it
becoming #!void or #f or #!undefined or alike when collected.
Any comments would be much welcome. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list