If I write:
dim tmpObj as Object
.... do something with tmpObj
' and than
tmpObj=Nothing
Did last line of code release resources used by tmpObj?
regard j
Printable View
If I write:
dim tmpObj as Object
.... do something with tmpObj
' and than
tmpObj=Nothing
Did last line of code release resources used by tmpObj?
regard j
Basically, the gc will look for unattached roots (orphaned references) on the heap. As long as there is no other references to the object (in this example, there isn't), the garbage collector will deallocate its memory on the next cycle.
It only marks it for the GC as ready to be collected. When the GC runs, it will release resources.
tks all
aaah this would end in endless discussion:D.Better you check previous threads for further info.