Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clear memory variables
Message
De
18/12/2001 18:12:51
 
 
À
18/12/2001 18:01:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00595913
Message ID:
00595917
Vues:
20
Hello Inge,

This is not a direct answer to your question...

If you limit yourself to using local variables in each method/procedure, every variable will "clear" at the end of each method/procedure. They do this because they go out of scope.

When you need a variable to be visible across a wider area, such as a form, you can add a custom property to the form and store that information there. Then, when the form is destroyed the variable (or property) will be gone.

For information that needs to be visible across the entire application, this can be stored in properties of an application object (or any other "manager" class, depending on the need). These objects, if they are created in the main program, are PRIVATE by default, and are visible to all programs at the main level and below.

You can save yourself a lot of headache by making the lifespan of each variable as short as possible.

Just my $.02.

Take care,

>How do I clear all memory variables which were declared in the current program without clearing any memory variables declared in the calling program?
>Thank you all!
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform