General information
Category:
Object Oriented Programming
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only