Could someone explain what might happen if you don\'t Dispose
some IDisposable
entity (by using
or direct Dispose
cal
IDisposable is meant to wrap an unmanaged resources (i.e. not .NET memory). So if you don't dispose them, you will leak things like open database connections, Window handles, file handles, etc. depending on what type of IDisposable you're failing to dispose.
So it's not truly a memory leak, but it can lead to performance degradation and eventually a crash as you run out of the unmanaged resources.