Assume that 'th' is an instance holding a
thread object.
th.start() causes the thread to start running and eventually complete its execution.
The object referenced by 'th' is not accessible any more and is garbage collected when the garbage collecter runs.
True / False
The given answer is false.
When 'th' is no long reachable... its elligible for garbage collection.
In the question above, there is a phrase "when the garbage collecor runs"..
So is it not true that when the garbage collector runs, the object referenced by 'th' is garbage collected?
Thanks in advance,
rajani.