Also, I think your implementation is a bit wonky :-{ Absolutely. Thanks. I need to set the local (static) disposed to true. But if I do that, then my implementation is the equivalent to the "recommended" one, isn't it?
As a general rule if a class implements IDisposable the user should call it's Dispose() method when they have finished using it. So you're saying (assuming we don't use the "using" construct) that this is really kind of a communication device between the developer of the class and the programmer who uses it? What happened to the "read.me" files :)?
In the second case the user (and, as importantly, the framework Using statement) would not be aware that it was recommended. Resources would only be released when the GC got round to finalizing it.Your implementation explicitly calling the GC, There are those who would say that is blasphemous, no? :)
But thanks for caring and kind regards,
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.