Why can .NET not have memory leaks?
- by Dinah
Ignoring unsafe code, .NET cannot have memory leaks. I've read this endlessly from many experts and I believe it. However, I do not understand why this is so.
It is my understanding that the framework itself is written in C++ and C++ is susceptible to memory leaks.
Is the underlying framework so well-written, that it absolutely does not have any possibility of internal memory leaks?
Is there something within the framework's code that self-manages and even cures its own would-be memory leaks?
Is the answer something else that I haven't considered?