JDK-8173071 : Release Note: Phantom references are automatically cleared as soft and weak references
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8u351,openjdk8u352,9
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-01-19
  • Updated: 2022-09-16
  • Resolved: 2017-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u351Resolved 9Resolved
Description
This enhancement changes phantom references to be automatically cleared by the garbage collector as soft and weak references.  

An object becomes phantom reachable after it has been finalized.  This change may cause the phantom reachable objects to be GC'ed earlier - previously the referent is kept alive until PhantomReference objects are GC'ed or cleared by the application.  This potential behavioral change might only impact existing code that would depend on PhantomReference being enqueued rather than when the referent be freed from the heap.