I guess part of my question is, if each of these is saying they implement
IDisposable, then is the framework "smart" enough to know that any reference
in an object to another object that implements Idisposeable is automatically
disposed of when its parent calls its own dispose method. Make sense?
Fergus makes a good point about external references to items in the
collection... I dunno... how is this usually handled? There is nothing
keeping someone for making a reference to an item in the objects collection,
then disposing the "parent" object... but that would seem pretty stupid... I
mean, If I'm going to dispose the object that gave me the reference in the
first place, I'd expect any other references to that objects members to go
bye-bye too!
-D
"Fergus Cooney" <fi****@post.com> wrote in message
news:up**************@TK2MSFTNGP09.phx.gbl...
Hi MC D,
If the Collection is the only owner of these objects, I'd say Dispose
of them explicitly. But if there may be other references floating around, you would be applying a knee to their balls!
Ouch.
It not done, it will happen automatically when the GC can be bothered,
so to speak.
Regards,
Fergus