Closed GoogleCodeExporter closed 9 years ago
I don't think this is an even possibly doable thing.
Once a reference gets into a ReferenceQueue, there are no more references to
the referenced object in the entire VM, by definition. If there's a strong
reference anywhere in the VM, it didn't get GC'd. You can't "intercept" an
object from getting garbage-collected like that.
Original comment by wasserman.louis
on 6 Sep 2012 at 9:42
Yeah ok that's right. Whereas from within your finalizer you can promote from
weak to strongly reachable. Was confused, thanks.
Original comment by brianfromoregon
on 6 Sep 2012 at 9:56
Yes...though that's one of the main reasons finalization is weird,
unpredictable, and best avoided.
Marking as Invalid because it's not possible.
Original comment by wasserman.louis
on 6 Sep 2012 at 10:13
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:13
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
brianfromoregon
on 6 Sep 2012 at 9:28