In particular, the case of a discovered reference which is later found to have been enqueued but still has a non-null referent is no longer possible.
For the most part, the Reference.next field no longer needs any special treatment, and can be handled like any normal object field. It still requires some special handling in support of FinalReferences though; a non-null next is the mechanism used to indicate a FinalReference is no longer active, since the reference object is not cleared.
(
- is blocked by
-
JDK-8193780 (ref) Remove the undocumented "jdk.lang.ref.disableClearBeforeEnqueue" system property
- Resolved
- relates to
-
JDK-8203028 Simplify reference processing in light of JDK-8175797
- Resolved
-
JDK-8175797 (ref) Reference::enqueue method should clear the reference object before enqueuing
- Closed