Z
Zen
Hi,
Would anyone know why the .net language would just issue calling the Dispose
method to all objects going out-of-scope if they implement IDispose. In
another word, if the "using" statement is implicit and automatic for all
scope then it would resolve many unmanaged resources leaking or unnecessary
accumulation. Why was it designed so that programmers have to go through the
process of finding out which one implementing IDispose and call on it?
Thanks!
Would anyone know why the .net language would just issue calling the Dispose
method to all objects going out-of-scope if they implement IDispose. In
another word, if the "using" statement is implicit and automatic for all
scope then it would resolve many unmanaged resources leaking or unnecessary
accumulation. Why was it designed so that programmers have to go through the
process of finding out which one implementing IDispose and call on it?
Thanks!