Hi, It seems that the GC abstains from ever reclaiming weakly referenced objects (that is, objects that are only 'referenced' by an instance of WeakReference, as defined in package java.lang.ref), even when the VM is running out of memory. Is there a bug in the way weak references (and possibly soft and phantom references as well) are implemented and/or dealt with by the GC in Kaffe? The attached piece of code creates both strongly referenced and unreferenced 'big' objects. A message is displayed whenever an unreferenced object is reclaimed (or, more precisely, finalized) by the GC. A weak reference is maintained to an otherwise not strongly referenced object. This object *should* be reclaimed by the GC. Apparently this is not the case...
best regards, Nicolas
Dummy.java
Description: Example of java code with weak references
