T
Tiraman
Hi ,
i would like to get some explanation about using the Obj = Nothing .
For example ,
I have a function that hold a local object like in this example
public function Test()
dim objMyCol as New Collection()
some code here ....
objMyCol = Nothing ' do i need this line ?
end function
should i use the objMyCol = Nothing before exiting the function Or it will
be set to nothing automatically when the function end ?
one more example ,
I have a class and i have in that class few public/private/shared objects
which are used all over the class .
do i need to close and to set the objects to nothing in the Finalize method
or they will be close and set to nothing automatically ?
does the garbage collector responsible for cleaning unclosed or unused
objects ?
10x in Advanced
Best Regards ,
Tiraman ;-)
i would like to get some explanation about using the Obj = Nothing .
For example ,
I have a function that hold a local object like in this example
public function Test()
dim objMyCol as New Collection()
some code here ....
objMyCol = Nothing ' do i need this line ?
end function
should i use the objMyCol = Nothing before exiting the function Or it will
be set to nothing automatically when the function end ?
one more example ,
I have a class and i have in that class few public/private/shared objects
which are used all over the class .
do i need to close and to set the objects to nothing in the Finalize method
or they will be close and set to nothing automatically ?
does the garbage collector responsible for cleaning unclosed or unused
objects ?
10x in Advanced
Best Regards ,
Tiraman ;-)