Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear memory variables
Message
From
18/12/2001 18:12:51
 
 
To
18/12/2001 18:01:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00595913
Message ID:
00595917
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform