posted 14 years ago
I got 1 object as well, Rekha. I think the trick is in
the line A d=new A().aob=new A(); which Henry Wong's graph
shows actually results in an anonymous A being created, which,
unlike d, gets it's object field initialized with another A,
and THIS is what d points to. So the trick is that after
that line, the anonymous A object is already eligable for
gc, without anything having to be nulled.
Is that right?