Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Many variables vs array
Message
De
19/11/2020 14:50:56
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677141
Message ID:
01677263
Vues:
75
An array is much faster than accessing properties of an object and it consumes less memory.

>Hi,
>
>I need to add some properties (all of type string) to the application class/object. It will probably start with about 10 but may grow to about 70 variables (in time). I can create each as a separate string property or combine them all into an array property.
>Example:
>
>oApp.Property1 
>oApp.Property2
>*-- vs
>oApp.aProperty[1]
>oApp.aProperty[2]
>
>
>Which approach is a better practice, in terms of memory management at run-time?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform