3 ms·
Not exactly, unique smart pointer (~-ptr) does not need the reference counting at all. It is comparable to a raw pointer with much stronger compile time check.
by lifthrasiir 14y ago
Not exactly, unique smart pointer (~-ptr) does not need the reference counting at all. It is comparable to a raw pointer with much stronger compile time check. In fact, I think using unique smart pointers does not require the runtime at all (I'm not sure as I'm still scratching the surface of rustc).
- pcwalton 14y agoThey don't require the runtime (the "embedding Rust in Ruby" post, for example, uses them), but they do require some implementation of malloc and free.