Hmm... Thats a lot of info to take in.
Simply the answer is no you don't need to assign nothing before assigning
another object reference to an existing one.
Nothing is not a magic word that causes VB to do drastically different things.
Basically what VB does when you use the SET assignment (Set objA = objB) is
this:-
Test objA for non-null value.
If non-null value found treat it as a pointer to an object and call the
objects release method
copy value of objB to objA
Test objA for non-null value
If non-null value found treat it as a pointer to an object and call the
objects AddRef method.
That's it.
Nothing is simply a Constant null object pointer.
Anthony.
"Slim" wrote:
this may be of some help
http://blogs.msdn.com/ericlippert/ar...28/122259.aspx
"Ven" <Ve*@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com... If an Object is holding a valid reference to an Object, should I set it to
Nothing before I set it to a another Object of the same type?
ex:
Dim objNode
Set objNode=Node1 ' Say node1 is some expression
' Do some processing and then. Should I set it to Nothing?
Set objNode=Node2 ' Say node1 is some expression
Is it the same in ASP and VB
Thank You