>Is it in a main.prg, or in the init event of a form, or at the beginning of a program?
>Do I have to release all those variables after using them?
>What happens if I don't?
>I've seen some posts of people not wanting to use public variables. What's wrong with PV's?
>
>TIA
>Ulises.
Nothing's that wrong with them, there's just better ways of getting the fuctionality they used to provide.
In my apps I do have one PUBLIC variable = my application object - this guy gets created in the main.prg. 99% of the time, though, I only need a variable to be accessible by any object on a form. If you find that's the case for you, create custom form properties to hold these values instead.
You don't necessarily have to release them (although with objects it's a good idea), but you have to be aware that changing their values in one process could affect another process that may have relied on the original values.
Insanity: Doing the same thing over and over and expecting different results.