I was having a discussion with a colleague recently about the value of Dispose
and types that implement IDisposable
.
I think there is value
If you aggregate IDisposable
s then you should implement the interface in order that those members get cleaned up in a timely way. How else is myConn.Dispose()
going to get called in the ADO.Net connection example you cite?
I don't think it's correct to say that everything is an unmanaged resource in this context though. Nor do I agree with your colleague.