Hacker News new | ask | show | jobs
by steveklabnik 2087 days ago
Rust does not attempt to stop leaks. It does make it less likely to happen, but completely preventing them is not even on the table.

This particular case might be because you would probably consume the vector in the loop, which would free, but you could absolutely write the exact same code in Rust with the same end result.