Re: Proper Cleanup of Variables in VFP 6.0
- From: Jack Jackson <jacknospam@xxxxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 12:25:56 -0700
On Tue, 23 Aug 2005 11:54:29 -0700, "Mike"
<Mike@xxxxxxxxxxxxxxxxxxxxxxxxx> 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?
I don't know enough about .NET to know how similar they are.
When you RELEASE a variable, it undefines the variable and if the
variable held the last reference to an object it frees the object.
If the variable held a reference to an object, setting the variable to
something else (.NULL., .F., etc.) will also free the object.
I try to free objects when they are no longer needed, just to keep
resource use low, but I normally do it by setting the variable that
holds the reference to .NULL. or .F..
Except for PUBLIC variables (which should rarely be used), I never
RELEASE variables.
.
- References:
- Proper Cleanup of Variables in VFP 6.0
- From: Mike
- Proper Cleanup of Variables in VFP 6.0
- Prev by Date: Proper Cleanup of Variables in VFP 6.0
- Next by Date: VFP Crashes Regularly
- Previous by thread: Proper Cleanup of Variables in VFP 6.0
- Next by thread: Re: Proper Cleanup of Variables in VFP 6.0
- Index(es):