Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a class form
Message
 
À
14/11/2001 11:46:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00579966
Message ID:
00581657
Vues:
47
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform