Re: Stopped threads never garbage collected
Posted By:
Blake_Minghelli
Posted On:
Thursday, September 19, 2002 09:03 AM
I agree that it looks like there are still references to the threads being held somewhere (probably in the class that started them). Just because the run() method completes, doesn't mean that the thread is gc'ed - gc still depends on whether or not there are still references to an object. I would double-check the class that starts the threads and see if the references are still there. For exapmle, are the threads added in a ThreadGroup? If so, then the ThreadGroup would still have references to each thread.
Re: Stopped threads never garbage collected
Posted By:
eimi_nos
Posted On:
Wednesday, September 18, 2002 03:06 PM
Even after a thread terminates, the reference to the thread must remain. What about setting null to the reference to the terminated thread?