3 ms·
> Large cyclic data structures which are freed as one piece are annoyingly difficult in Rust. If you really are deallocating the cyclic structure all at once,
by anewvillager 7y ago
> Large cyclic data structures which are freed as one piece are annoyingly difficult in Rust.
If you really are deallocating the cyclic structure all at once, just use an arena and represent each element as an indice. Like https://docs.rs/petgraph/0.5.0/petgraph/ https://docs.rs/petgraph/0.5.0/petgraph/ or https://docs.rs/specs/0.15.1/specs/ https://docs.rs/specs/0.15.1/specs/
- _pmf_ 7y agoJon Blow addresses this in some earlier rant here: https://www.youtube.com/watch?v=4t1K66dMhWk https://www.youtube.com/watch?v=4t1K66dMhWk His point being that now you're effectively implementing a form of manual memory management to circumvent the borrow checker.