Name: krC82822 Date: 02/01/2001
01 Feb 2001, eval1127@eng -- this is apparently related to # 4229558.
However, that bug's synopsis is stated in terms of an inconsistency
between 1.1.x and Java 2, and is thus hard for users to quickly
find/identify the underlying problem on the Bug Parade.
Am opening a separate bug purely for tracking purposes (will dupe to
#4229558)
-------------
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
Threads that are not started cause a memory leak, and are never garbage
collected even if they have no pointers referencing them.
The following code will show this, I used OptimizeIt 4.0 to determine this
memory leak.
public class ThreadTest {
public static void main(String args[]) {
while (true) {
try {
Thread t = new Thread();
// start thread for memory leak workaround
// t.start();
t = null;
System.gc();
Thread.sleep(500);
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
}
}
(Review ID: 116183)
======================================================================