Re:Bjarne Stroustrup – The Essence of C++ [video]
by moron4hire on Tuesday September 17, 2013 @08:55AM
(#6398948)
A class implementing IDisposable is that documentation. You shouldn't need more documentation than the fact that IDisposable is there.
[ Parent
| on HN ]
Re:Bjarne Stroustrup – The Essence of C++ [video]
by jasomill on Tuesday September 17, 2013 @10:33PM
(#6403086)
An annoying fly in this ointment is cases where objects assume the responsibility for calling Dispose on caller-provided disposable objects. While it should always be okay to "double-dispose", this is only a guideline, and can't be enforced by the language, so, to maximize future compatibility with classes outside your control, you should probably defensively avoid calling Dispose on an object that will have already been disposed by other means.