Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing objects explicitly
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Releasing objects explicitly
Miscellaneous
Thread ID:
00404342
Message ID:
00404342
Views:
48
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
Map
View

Click here to load this message in the networking platform