If it is running, it is not suitable for the GC - code that works may request Thread.currentThread(), in the end.
If you just created it but did not start it, follow these steps:
{
Thread pointless = new Thread();
}
then I suspect that he will be entitled to the GC - but itβs rather unusual to create a thread without starting it. (I assume that the exception could be thrown before you got it to start it ...)
source
share