>It does it in my application (an executable) and from the command line.
Did some testing, and found what I thought to be true:
When you call a form from the command window, VFP declares the variable that references the form PUBLIC. This is the same as any other variable created in the command window.
When you run a form from another form, or from a prg, the variable that is created is private by default: that means it is in scope in all subordinate procedures until that procedure finshes. If you use the LINKED clause, your form will be released when the calling procedure finishes executing. Using the NAME clause does nothing more than assure that you know the name of the variable that VFP creates when you call the form.
I think that your test method has skewed your impression of what is happening. If you ever called the first form from the command window, than its variable got scoped PUBLIC, and was not destroyed. Subsequently calling the form from a prg assigned the form to the same variable, which was already public, this showing up in the debugger.
Did I just confure things more?
Erik Moore
Clientelligence