Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When I release last object reference, what should happen
Message
De
19/07/2000 15:57:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00394466
Message ID:
00394530
Vues:
9
>OK, it's stupid question time!
>
>I created an object called my TimerManager. To test it I ring the bell every 5 seconds. So I create my object with goTimerMgr = newobject("TimerMgr", "TimerMgr.prg"). Don't laugh, it works. When I do goTimerMgr.destroy it goes away, as expected.
>
>But I expected that the command "release goTimerMgr", as well as the command "goTimerMgr = null" would do the same thing, but they don't.
>
>Did I misunderstand something? Does this only work for Linked Forms?

If the only reference to the object is a variable, then that object should be destroyed when the variable is cleared or goes out of scope. Is there something you're not telling us?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform