A variable local to a procedure (sub/function) is destroyed on exit from
that procedure. VB handles that for you behind the scenes. Same thing
for objects, but it never hurts to clear your reference by setting it =
nothing.
Nothing in VB is global or public to other objects/functions unless you
define it that way.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
On
> Behalf Of tellef
> Sent: Friday, September 14, 2001 11:32 AM
> To: INTERNET:[EMAIL PROTECTED]
> Subject: Re: From The Edge: RUN filespec vs. QUIT TO filespec
>
> Jim:
>
> >and like I said if all goes well,
> >the object gets destroyed when the programmer is through
> >with it. This is not always the case - obviously. I don't
> >know how much programming you have done in VB/ C++ or some
> >other languages, but the objects created to do work in a
> >Windows environment can be huge... At least in the aspect
> >if you accumulate them without destroying them.
>
> I have done some programming in VB and at first all I could
> think of is that I've worked on some HUGE projects but there
> was never any code to clear specific variables, such as we
> in RBase land always do. I suppose I could look it up in
> one of my VB books, but I don't remember where the variables
> 'go' when the module is complete. Leaving variables around
> didn't seem to be a problem.
>
> But I forgot that we always set objects '= nothing' when we
> were done. So you're right, even in VB there is some cleanup
> that needs to be done.
>
>
> Karen