| Author |
Daemon thread
|
muthu muruges
Ranch Hand
Joined: Feb 28, 2003
Posts: 70
|
|
|
Whether the daemon thread will be GCed if it comes out the run method provided the main thread keep on running?
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
Yes. Well as usualy, there are no guarantees regarding GC, and if you have saved a reference to the thread somewhere, you certainly my prevent GC. But in general, once a thread completes its run method it will be eligible for GC (unless there are other references somewhere). Being a daemon thread does not change this.
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: Daemon thread
|
|
|