4 ms·
can you elaborate please?
by sbt567 6y ago
can you elaborate please?
- steveklabnik 6y ago... I am not really sure how to elaborate, to be honest. Rust prevents memory unsafety, but memory leaks are not memory un-safe. There are many kinds of bugs that Rust does not prevent. Leaks are one of them.
- zerpelin68 6y agoHow can leaked memory, pragmatically, be considered safe? The language spec definition seems useless.
- steveklabnik 6y agoThe only issue memory leaks can cause is being a DDoS vector. Memory unsafety can cause a host of other issues, and much more serious ones. It is also very difficult to come up with a definition of "memory leak" that doesn't include programmer intention, and so it's not clear that you can come up with static analysis to preclude it.
- zerpelin68 6y agoAgreed there is not much you can do about a programmer using memory in an unsafe way...so what is the point?
- steveklabnik 6y agoYou can, in general. Just not for memory leaks. The point is defense in depth.