Hi,
I think that the while you still have a reference to that object it will not be gc.
public class TestThread extends Thread{
public void run() {
System.out.println("Thread started");
}
static void alive() {
System.out.println("The object is alive");
}
public static void main(
String args[]) {
TestThread t = new TestThread();
t.run();
try
{
t.join();
}
catch (InterruptedException ex)
{
}
System.out.println("The thread is alive:" + t.isAlive());
t.alive();
}
}
.. Cristian