OK thought I understood IDipose but just reading the best practices section of Accelerated VB.NET and it states that ‘The object doesn’t contain any objects that implement iDispose, so you don’t need to iterate through the containment tree calling iDispose’
Is this ‘containment tree’ just what the program know’s he has used and then distroys, or is there a contaiment class / collection that I should be looking at when I distroy an object ?
I haven’t read the book but I’ve never heard of this “containment tree”. In context, it sounds as if this merely means all fields (of a given class) that also implement
IDisposableand consequently have to be disposed in the class’Disposemethod (if thedisposingargument isTrue) – or rather, in your case, since there are no such fields you don’t have to take any further action.