JDK-8071507 : (ref) Clear phantom reference as soft and weak references do
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-01-23
  • Updated: 2017-05-17
  • Resolved: 2015-12-28
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 9
9 b103Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8173071 :  
Description
Soft and weak references are automatically-cleared references (i.e. these references are cleared by the collector before it's enqueued) whereas phantom reference is not an automatically-cleared reference.  Instead, the get method of a phantom reference always returns null to ensure that the referent of a phantom reference may not be retrieved.

This proposes to make phantom references automatically-cleared reference as soft and weak references do.