Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why don't I see cleanup class?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00671062
Message ID:
00671095
Vues:
17
>I personally do not see very big advantages in having the class for such cases. Those 3 lines are clear and self-sufficient. You will replace them with two lines. What's the big deal? :)

Self clean up when they go out of scope. So you don't forget to do it yourself.
The same can be done with classes that maintain and restore old state for other settings like:
SET DELETED ON|OFF
CURDIR | CD | SET DEFAULT
SET ORDER TO
Current ALIAS()
...
and anything else you can think of that you change in some methods and must restore/clean up upon exit from the method.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform