Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDisposable Mysteries
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01506168
Message ID:
01506271
Views:
53
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform