Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form array property vs many properties?
Message
De
04/02/2008 09:28:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01288030
Message ID:
01289023
Vues:
19
>>>>>Thank you, Sergey. The only thing I have to watch with your approach is to set .oProp to .NULL. in the form unload, in order to avoid dangling references. With form properties and arrays, nothing has to be done when the form is closed. But your approach is interesting.
>>>>
>>>>Not in this case. No dangling references with this approch even if you do not release the object explicitly.
>>>
>>>Thank you for clarifying this. I am curious, no dangling reference because the object property was created in INIT method and not permanent?
>>
>>There's nothing that can prevent it from releasing. No other references to it and it doesn't have properties referencing other objects.
>
>In your original suggestion should it be
>Thisform.AddProperty("oProp", NULL)
>
>instead of
>Thisform.AddProperty("oProp", "Empty")
>
>or it doesn't really matter?
Depending on the coding style
Thisform.AddProperty("oProp", createobject("Empty"))
might be more fitting
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform