posted 12 years ago
Hi, Joey.
When we say an object is eligible for GC, it means it is only possible to be GC. But there is no guarantee that it will be GCed.
When an object has no variable referring to it, it will be eligible for GC.
The object is just a like a piece of trash inside a trash can. The trash will be ready to be picked up by the truck. But there is no guarantee that the truck will come by to pick up the trash.
For more information, you can check on some other posts titled "Garbage Collection" and "Garbage Collection 2".