Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices
Message
De
09/02/2013 09:30:12
 
 
À
08/02/2013 10:01:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01565478
Message ID:
01565612
Vues:
158
>It isn't. If you instantiate the class with newobject or with SET CLASSLIB TO, you'll allocate memory either way. What I failed to clarify is that if you instantiate the class everytime you needed, there is overhead involved vs. doing it only once.

It's not a memory issue, it's a performance issue. NEWOBJECT() is slower because it has to find the specified library, open it (doing all the necessary parsing), instantiate the class, and close the class library. With SET CLASSLIB TO, you skip all but the instantiating task when you CREATEOBJECT().

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform