3 ms·
Manual memory management requires the programmer to insert calls to free at specific points in the program. That's manual static lifetime determination. A tradi
by kibwen 6mo ago
Manual memory management requires the programmer to insert calls to free at specific points in the program. That's manual static lifetime determination. A traditional garbage collector uses runtime analysis to determine when it's safe to call free. That's automatic dynamic lifetime determination. What Rust does is automatic static lifetime determination. Designing your data structures such that they're acyclic is not what anyone means when they say "manual memory management".
- pjmlp 6mo agoRust requires the programmer to manually design data structures and code algorithms in a way that doesn't trigger borrower checker compile errors. There is nothing automatic out of it. Write Rust code, compile error if done incorrectly, manually fix the data structure or algorithm root cause, loop.