4 ms·
The Rust Book has an example: https://doc.rust-lang.org/book/ch15-06-reference-cycles.html https://doc.rust-lang.org/book/ch15-06-reference-cycles.html Of cour
by jamincan 4y ago
The Rust Book has an example: https://doc.rust-lang.org/book/ch15-06-reference-cycles.html https://doc.rust-lang.org/book/ch15-06-reference-cycles.html
Of course, leaking memory is as easy as using `Box::leak`, although that's probably never going to happen accidentally.