Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing objects explicitly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Releasing objects explicitly
Divers
Thread ID:
00404342
Message ID:
00404342
Vues:
49
I, like many people, have certain habits I get into which are hard to break. (For instance, I insist on placing a SELECT statement immediately before an ENDSCAN, even though objectively I know it will happen implicitly.)

One such habit involves releasing objects. When I create an object by issuing the commands:
LOCAL loMyObject
loMyObject = CREATEOBJECT(...)
I will typically, at the end of the method/procedure, issue:
RELEASE loMyObject

I do so because I have a vague memory of having left a dangling object reference once by failing to explicitly release an object. My question is, is there a time when the RELEASE statement is actually required? If there is not such a situation, is it better programming practice (that's a judgment call, I know) to issue the RELEASE command or not to?

Thanks!
zahid
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform