Thanks for the detailed explanation.
The GC only calls the finalizer (release function?) when it reclaims the
space of the object.
So as long as you can get your hands on o2 (when w1’s action procedure is
executed), the
finalizer will not have been called.
After w1 and o2 have been set to #f, is there anything preventing the space for either of them to be reclaimed anytime? In particular, - is the fact that o1 hasn't been reclaimed yet keeping w1 alive? - will the reference to o2 in w1's action closure prevent it from being reclaimed before that closure is reclaimed?
A corollary to the latter: if I delay the execution of w1's action closure for long enough (e.g. by holding onto o1) could I ever get it to execute with o2_ pointing to freed/invalid memory?