Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a class form
Message
 
To
14/11/2001 11:46:56
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00579966
Message ID:
00581657
Views:
46
>>It is very easy to totally eliminate this potential problem forever, simply NEVER USE PUBLIC VARIABLES and this problem will NEVER happen.
>
>Would the problem still exist if the public variables were RELEASEd properly? Creating a public variable and not releasing it sounds like more of a bad programming practive than using a public variable.

Mike,

Here's my point;

Create a public var (you must release it or else trouble may occur)

Create a privbate var (it gets released when the routine ends and is global to everything called)

So, then, I ask why ever use a public as it only introduces a possible omission for you (forget to release it). A private in the start up program has all of the "benefits" of public and yet it does not have the one MAJOR drawback of outliving its creator.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform