Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices
Message
De
08/02/2013 09:50:45
 
 
À
08/02/2013 09:45:22
Mike Sue-Ping
Cambridge, Ontario, Canada
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:
01565486
Vues:
109
It will take more time to newobject() because memory has to be allocated. However, as fast as computers are today, I don't think you'll notice the difference.

You could also go a hybrid route and use a class factory. The class factory would load the classlib or procedure as needed, then just keep a reference to it. That way, things are only loaded if needed, but kept after that.

>Thanks for the feedback.
>
>I've used newobject() in other projects but this particular one is inherited code that, as I've mentioned before, uses set classlib.
>
>The thing that I'm still unsure of is, does using newobject() reduce system resources (or offer other advantages other than not having to set classlib) when compared to set classlib? If it does, then I'd attempt to switch over to using newobject() instead. If not, then I wouldn't bother.
>
>Mike
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform