Re: Proper Cleanup of Variables in VFP 6.0
- From: "Dan Freeman" <spam@xxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 13:43:45 -0700
NOTHING is VB-speak for NULL. It's not releasing the variable, it's setting
it to Nothing. When an object reference is set to null, the instance counter
for that object is decreased.
In VFP, variables get released automatically when they go out of scope,
although it's recommended to set object references to Null beforehand.
RELEASE actually gives memory back to the runtime engine, where NULLing a
variable keeps the memory occupied and just stores a different value to it.
Dan
Mike wrote:
> I'm developed .NET apps for the past 2 years and now I'm working with
> my first VFP6.0 application. In .NET, you can keep your programming
> 'clean' by setting the value of non-managed resources = NOTHING.
> I've noticed in VFP you can specify that your variables are
> 'released' by typing "RELEASE variablename". Are these two functions
> essentially the same? Or are they different?
>
> Thanks.
.
- References:
- Proper Cleanup of Variables in VFP 6.0
- From: Mike
- Proper Cleanup of Variables in VFP 6.0
- Prev by Date: VFP Crashes Regularly
- Next by Date: Re: VFP Crashes Regularly
- Previous by thread: Re: Proper Cleanup of Variables in VFP 6.0
- Next by thread: VFP Crashes Regularly
- Index(es):
Relevant Pages
|