Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDisposable Mysteries
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Divers
Thread ID:
01506168
Message ID:
01506271
Vues:
54
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform