Re:A simple C implementation to stream H.264 to browser usin...
by hctaw on Thursday April 08, 2021 @01:08PM
(#26741247)
Yes, but grep for `Rc::new()` in actual rust code bases compared to `shared_ptr` in C++. Interior mutability is cumbersome and not a natural pattern in practice.
Re:A simple C implementation to stream H.264 to browser usin...
by steveklabnik on Thursday April 08, 2021 @12:39PM
(#26740878)
Yes, it is the same thing.
> We can see that Rust allows memory leaks by using Rc<T> and RefCell<T>: it’s possible to create references where items refer to each other in a cycle. This creates memory leaks because the reference count of each item in the cycle will never reach 0, and the values will never be dropped.
This sounds a lot like what happens when you create a circular reference with std::shared_ptr ?