How to dispose objects created in a Sub or functions like this:
Public sub MyXTree()
Dim mynode as treeview
Dim xString as string
'Do some thing with xtree
for mynode in Treeview.Node
xstring = mynode.text
Mynode=Nothing '? is this the right method of disposing
xString = Nothing '?is this the right method of disposing?
'In VB6 by declaring nothing we can dispose off the object provided the object is not called immediately. Otherwise same reference of the object will be created with garbage value.
'I want to know how to dispose object declared inside a sub or function after the work is done.
'Friends if u know please Write to me.