Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() vs NewObject()
Message
 
À
23/08/2007 19:08:35
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01249678
Message ID:
01250072
Vues:
31
>Agreed, but they are part of the language. If much to my constant dismay you have two unrelated objects in a single vcx/prg you cannot release the classlib/procedure because the other class may still be open.

Actually, you can never release a classlib/procedure once it's open, for you do not know if an object still requires it or will require it

>To a degree I suppose. The "isolation" you are talking about IMO is only to have the properties' values and methods isolated from other objects at runtime. In fact, I believe most people open all procedures and vcxs at startup, so that in effect they are also only using the classes.

I agree, but one bad behaving object can cause havoc in the flock, just by closing a library/procedure file or just by forgetting to add one keyword (additive). This of course can be minimized by the use of standards, for example as you say opening all of them at the begining and never closing them, but again, you might get bite by some third party class and finding the culprit might not be as easy
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform