Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set ? = nothing

Status
Not open for further replies.

Muddmuse

Programmer
Jul 31, 2001
85
US
If I create an object like this:

Set objXML = Server.CreateObject("MSXML2.DOMDocument.4.0")

then set other variables like this:

Set root = objXML.documentElement

do I need to set both to nothing when I'm finished with the objects or does setting only the initial object to nothing clean up any others referenced from it? In other words, should I do this:

Set root = nothing
Set objXML = nothing

or is this sufficient?

Set objXML = nothing
 
It is a good practise to set any object that you open back to nothing, therefore leaving nothing open (to chance/waste/etc.). Insanity is merely a state of mind while crazy people have a mind of their own.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top