3 ms·
Not the OP, but in my experience it's fairly rare to encounter someone using the `Rc` type in Rust. It's nowhere near as prevalent as `shared_ptr` seems to be i
by kibwen 10y ago
Not the OP, but in my experience it's fairly rare to encounter someone using the `Rc` type in Rust. It's nowhere near as prevalent as `shared_ptr` seems to be in C++, for example.
- pimeys 10y agoThere is also the `Arc` type, which is an atomic reference counter. You still need those, especially if you need to share stuff between multiple threads.
- Jweb_Guru 10y agoYou can often get away with using scoped threads.
- vvanders 10y agoYeah, a lot of that has to do with the borrow checker guiding you towards single-ownership designs with is a good thing(tm).
- pimeys 10y agoThis is a good article about different wrapper types in Rust http://manishearth.github.io/blog/2015/05/27/wrapper-types-in-rust-choosing-your-guarantees/ http://manishearth.github.io/blog/2015/05/27/wrapper-types-i...