3 ms·
Actually... the counterpart to the C++ new operator would be the perfectly safe `Box::into_raw(Box::new(whatever))` - along with its counterparts on other smart
by vertex-four 10y ago
Actually... the counterpart to the C++ new operator would be the perfectly safe `Box::into_raw(Box::new(whatever))` - along with its counterparts on other smart pointer types - and there may be a heap module one day[0] - but your point stands that this is not the "default" way of allocating.
[0] https://doc.rust-lang.org/alloc/heap/ https://doc.rust-lang.org/alloc/heap/