|
|
|
|
|
by Manishearth
3687 days ago
|
|
> For when single ownership does not suffice, Rust programs rely on the standard reference-counting smart pointer type, Rc, and its thread-safe counterpart, Arc, instead of GC. This is a library thing, not a language thing. If single ownership is enough for you, go ahead and use it. But if you need a different memory management strategy, that is available too. Rust, the language, provides a single clear memory management strategy. It also provides the ability to design your own abstractions for different strategies, and implements some of these in the stdlib. C/C++ have refcounting and GC libraries too. Does that make them a joke? |
|