2 ms·
> To dereference a generational reference, we do a "liveness check" to see whether the allocation's generation number still matches our reference's target gener
by layer8 4y ago
> To dereference a generational reference, we do a "liveness check" to see whether the allocation's generation number still matches our reference's target generation.
How does this work with threading (use after check)? Or are allocations always limited to a single thread?
> This will safely halt the program
So it’s not statically memory-safe. That’s not hugely attractive I have to say.
- cwzwarich 4y ago> So it’s not statically memory-safe. That’s not hugely attractive I have to say. Ref-counting with mutable data (which this seems to be replacing?) works the same way in Rust. You need to take an Rc/Arc of RefCell, and calling borrow/borrow_mut on RefCell can fail at runtime.