T
Thore Berntsen
I'm trying to understand the IDisposable pattern. In the sample on MSDN they
have added a destructor/finalizer like this:
~MyResource()
{
Dispose(false);
}
Calling Dispose(false) will only dispose non managed resources. If I
implement IDisposable only to dispose managed resources isn't this finalizer
unecessary then? Wouldn't the finalizer just at an extra burdon on the GC?
The MSDN sample is found here:
http://msdn2.microsoft.com/en-us/library/system.idisposable.aspx
Thore Berntsen
have added a destructor/finalizer like this:
~MyResource()
{
Dispose(false);
}
Calling Dispose(false) will only dispose non managed resources. If I
implement IDisposable only to dispose managed resources isn't this finalizer
unecessary then? Wouldn't the finalizer just at an extra burdon on the GC?
The MSDN sample is found here:
http://msdn2.microsoft.com/en-us/library/system.idisposable.aspx
Thore Berntsen