[thelist] VBScript Question about Empty and Nothing

Philip Raymond philip at papaquack.com
Thu Nov 1 12:08:54 CST 2001


Thank you so much!!!  That makes perfect sense.

Have a GREAT day!!!
Philip

----- Original Message ----- 
From: "Scott Dexter" <sgd at ti3.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, November 01, 2001 11:55 AM
Subject: RE: [thelist] VBScript Question about Empty and Nothing


> > When setting a variable 
> > to Nothing
> > after using it as an object, is it necessary (or good 
> > programming practice)
> > to set the variable to Empty, as in the following code?
> 
> AFAIK, The object does get torn down when you set it to Nothing, but the
> object *reference* stays around until you set it to Empty. I don't know
> at which point the object is dumped from memory (the docs tell us it's
> when you set it to Nothing, but I don't buy it)
> 
> To be the absolute cleanest, I recommend doing both; better safe than
> sorry....
> 
> > 
> > Also, a related question, if I Dim a variable 
> > in a procedure
> > and use it, should I declare that variable as Empty at the end of the
> > procedure, or does it really matter either?
> 
> local vars in this scope will get cleaned up automagically. This one you
> don't gotta worry 'bout =)
> 
> hth
> 
> sgd
> 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list