JDK-8037099 : [macosx] Remove all references to GC from native OBJ-C code
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2014-03-11
  • Updated: 2017-10-03
  • Resolved: 2014-03-14
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 7 JDK 8 JDK 9 Other
7u131Fixed 8u121Fixed 9 b08Fixed openjdk7uFixed
Description
OBJ-C Garbage Collector was deprecated in 10.8 and it's not supported any more. It is actually not used in JDK, however there are some legacy references to it in our code like overridden finalize method or CFRetain/release pattern. All this could be safely removed.
Comments
It's not about Java finalize, but about native finalize. We have quite a lot of commented out finalize overrides and 2 real overrides in Accessibility code.
11-03-2014

And I about "like overridden finalize"
11-03-2014

I'm talking about the occurrences of this pattern: if (object) { CFRetain(object); // GC [object release]; }
11-03-2014

Note that CFRetain is used to increment a counter, when we have a reference from java to native. Otherwise we can get a live java object and deallocated native.
11-03-2014