posted 25 years ago 1. Its the garbage collector that decides for itself if
an object is not needed. You can set all reference to an
object to null to make sure that when the garbagecollector
looks at it will consider it eligible.
2. That's right you don't know when garbage collection will
happend and there is no order to it.
3. It's suppose to but there is no guarantee.
You can't be suure that a large object that using up
all your memory will be garbage collected before
you create 10 more. The other thing I read is that
there is this problem that java programers face on some
String intensive programs. They say that String
literals don't realy ever get garbage collected.
At least one copy stays in the pool forever.