Herfried,
I agee. Speaking more generally, interfaces are contracts. If a class
(or one of its derived classes, which one does not matter) implements
'IDisposable', this means "I cannot guarantee that I will never need
unmanaged resources". Even if the current implementation does not use
unmanaged resources, by implementing the interface it indicates that this
is not guaranteed.
But implementing IDisposable means direct that there is no need to call
dispose for all child members.
While we see that the sample implementation shows forever component in the
implementation.
However this combinantion gives direct the method dispose to every child and
a kind of foolish talking from people not knowing what to do on Internet
became populair.
"If you don't know why something is, than use it. I probably does not hurt"
Somebody who tells or write this in programming shows for me that he is an
absolute amateur.
Cor
Imagine even the case that another implementation of the
class than those contained in the .NET Framework may actually use
unmanaged resources and thus calling 'Dispose' makes perfect sense.
Unfortunately developers even nowadays spend a lot of time on
micro-optimizations which are often "unclean" hacks which will work on
their system, using a certain implementation, ..., but which are
counter-productive from the long-term perspective.
I don't think such an example exists (if the call is performed if the
object is not in use any more) because a method call is done quickly and
its better to do it sooner than later in order to prevent a resource
bottleneck.