Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() and NULL
Message
De
15/02/2000 22:49:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00332539
Message ID:
00332713
Vues:
15
>>I have heard that after you use CreateObject() or NewObject() to create an object reference to anything, you should set the object reference to NULL when you are done with it. Is this something that really should be done, and what are the consequences of not doing this?
>>
>>Thanks,
>>Jonathan
>
>>This is only necessary when assigning the object's reference to the property >of another object.
>
>>Otherwise, when the local variable you assign the object to goes out of scope, >the object is destroyed
>
>This technique alleviates VFP GPFing. Unresolved object references will cause this type of error.

I have seen this argument, but never experienced it myself. I NEVER set object references to NULL, and I have never encountered this. Besides, letting a variable go out of scope is not an 'unresolved object reference'.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform