No, this is kinda right. Memory leaks =/= memory safety. Memory leaks are just when you keep allocating more and more memory, and can be done in any language. If I make accidentally make a list that infinitely grows in python, that’s a memory leak.
There are techniques to write code that is mostly free of leaks, which is what he is referring to.
Memory safety, on the other hand, doesn’t seem to be mentioned on that page…
A “true” memory leak isn’t just memory that is never freed, it’s memory that CAN’T be freed. Usually because the handle / pointer to it was thrown away.
The distinction isn’t really all the important though, it all looks the same as far as how the program functions.
No, this is kinda right. Memory leaks =/= memory safety. Memory leaks are just when you keep allocating more and more memory, and can be done in any language. If I make accidentally make a list that infinitely grows in python, that’s a memory leak.
There are techniques to write code that is mostly free of leaks, which is what he is referring to.
Memory safety, on the other hand, doesn’t seem to be mentioned on that page…
A “true” memory leak isn’t just memory that is never freed, it’s memory that CAN’T be freed. Usually because the handle / pointer to it was thrown away.
The distinction isn’t really all the important though, it all looks the same as far as how the program functions.