Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release Property
Message
 
À
21/12/1999 11:18:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00306719
Message ID:
00306745
Vues:
26
>Hi,
> I have a property of myclass that store the reference of an object. How to RELEASE the property? I try myclass.oObjRef = .NULL.
>does it RELEASE the object?
>
>Thank you

John,

Yes as long as there are no other references to that object anywhere else.
For example;
PUBLIC goObj
goObj = CreateObj("Whatever")
Thisform.oObj = goObj  && form property is now a reference to the object

Thisform.oObj = NULL  && form property is no longer a reference to the object
                      && but the object still exists because goObj hiolds a
                      && reference to it
RELEASE goObj && Now the object dies because there are no more references to it
If the form property was the only reference to the object then Thisform.Property = NULL would destroy the object.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform