As I know, from the spec (and from the standard non-android) java, If an object is only "Weak Referenced", that is, only reachable by weak references - it will be collected by the garbage collection the next time it runs.
In my android app, for some reason, This is not the case.
A quite heavy object (Activity) stays in the heap every time its created, but when I perform a heap dump and examine it in the Eclipse Memory Analyzer I see that the object remained in the heap, even though it's only weak referenced (as can be seen in merge paths to GC roots option)
When I explicitly clear the weak reference, the object gets cleared.
I run my app on Android 2.3.3. It looks like a some kind of platform bug.
Am I missing something? Has anyone else encountered this issue?
Thanks, Yoav