The fact that the thread has finished execution does not alter the validity of the reference to the object. While you hold that reference the Thread object cannot be garbage collected.
This means that while you hold a reference to the Thread you are able to call things like isAlive
. When you release all references the Thread can be garbage collected.
If you wish to have a reference to an object without preventing that object from being garbage collected then you must use a a WeakReference. When you use such a reference you must check to see if the object referenced still exists.