General information
Category:
Coding, syntax & commands
>>>Set MyObject = Nothing
>>>Is there an equivalent in VFP 9?
>
>Depending on the scope of MyObject, you have some flexibility.
>
>1) MyObject = NULL leaves a variable with null value that survives as long as the variable remains in scope.
>2) RELEASE MyObject destroys it completely.
>
>And less obviously
>
>3) Do nothing- if MyObject isn't public, it will go out of scope and disappear when the method finishes, unless you have "hanging references" to it from surviving variables or objects.
Just a minor point, John...
#2 will act much like the "unless..." of #3 and with NO WARNING whatsoever. The difference is that the RELEASEd object reference will itself be released, but the object itself will persist! This has always been ugly (and wrong) to me.
cheers
Previous
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