코딩Coding/★Rust★기초★Syntax
How to create a cyclic reference with Arc and Weak?
내인생PLUS
2023. 9. 10. 13:47
728x90
https://stackoverflow.com/questions/50425910/how-to-create-a-cyclic-reference-with-arc-and-weak
How to create a cyclic reference with Arc and Weak?
I have two structs: struct A { map: HashMap<u32, Vec<B>>, } struct B { weak: Weak<A> } When A is constructed, it will own several B, each of which links back to the A ...
stackoverflow.com
반응형