Next: Will Executors
Up: Memory Management
Previous: Memory Management
A weak box is similar to a normal box (see section 4.9),
but when the automatic memory manager can prove that the content value
of a weak box is only reachable via weak boxes, the content of the
weak box is replaced with #f.
- (make-weak-box v) returns a
new weak box that initially contains v.
- (weak-box-value wb) returns
the value contained in the weak box wb. If the memory manager
has proven that the previous content value of wb was reachable only
through weak boxes, then #f is returned.
- (weak-box? wb) returns
#t if wb is a weak box, #f otherwise.
PLT