Hacker News new | ask | show | jobs
by doublextremevil 1139 days ago
How does Mojo deal with memory management? Does it have the same memory safety issues as C and C++?
2 comments

Mojo has a full ownership system that learned a lot from Rust and Swift and took the next step. Some details here if you're interested: https://docs.modular.com/mojo/programming-manual.html#argume...
At the moment, you can handle memory manually with alloc/free (and there's stuff there to help with RAII), or you can use Python ref counting. Borrow-checking is currently under development, as discussed here: https://docs.modular.com/mojo/roadmap.html#ownership-and-lif...