Name: dgC58589 Date: 12/10/97
Sometimes threads seem not to be deleted from thread groups when they
are killed. This is a problem in itself that I don't yet understand.
But, those threads have definitely died, they are not running, etc. But
they can cause applets and applications to hang around because they still
reference a "target", which was loaded by a classloader. This means that
the applet or application can never have its classes garbage collected,
because of that one reference to an instance that was loaded by that
clcassloader.
So, a work-around for the fact that threads are sometimes not deleted from
their thread-group when they are stopped is to simply null out the target
instance variable when the thread is stopped.
Actually, I just realized that this would make it impossible to stop a thread
with a target and then restart it. Do people do that?
Damn!
(Review ID: 21671)
======================================================================
- duplicates
-
JDK-4095605 Thread.stop() leaks memory
-
- Closed
-