Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
orneryostrich
· 6y ago · 0 comments
But if your program is single-threaded, you don’t need an `Rc` type. The whole point of `Rc` and `std::shared_ptr` is so an object can have one owning pointer per thread, in cases where you’re not sure which thread will finish using the object last.
Comments
[–]
pjmlp
6y ago
Sure you do, try to implement a Gtk-rs application without the Rc<RefCell<>> dance for widgets state.