Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of Nothing in VB
Message
From
07/06/2005 21:15:39
 
 
To
07/06/2005 20:11:41
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01021162
Message ID:
01021186
Views:
21
>>>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
Map
View

Click here to load this message in the networking platform