Very much no. Cycles are an extremely important feature of reference counted objects, as long as you tear them down properly. There’s no reason to try to forbid them.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Preventing `Rc` leaks when it references the stack | 3 | 2849 | March 25, 2019 | |
[Feature Request] Add #[leaky] attribute | 2 | 701 | January 20, 2022 | |
Idea: Leak auto trait and Drop call guarantees | 13 | 1911 | March 9, 2021 | |
Blog post: Thoughts on trusting types and unsafe code | 47 | 5919 | March 25, 2019 | |
Zero-cost interior mutability - proposal | 46 | 1717 | November 28, 2024 |