Information générale
Catégorie:
Programmation Orientée Object
Titre:
Releasing objects explicitly
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement