------- Comment #4 from aph at gcc dot gnu dot org 2007-02-22 15:19 ------- I can't see anything in the Java Language Standard that suggests that your test case must terminate. Garbage collection is not deterministic, and may not collect all objects.
When I tried your test case one object was not reclaimed, probably because a reference to it still existed in the stack. In gcj we do a conservative scan of the stack, and there may be stale references that prevent objects from being collected. To guarantee that everything is collected you have to do a precise scan, and we deliberately don't do that. -- aph at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886