Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8037099

[macosx] Remove all references to GC from native OBJ-C code

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • OS:
      os_x

      Backports

        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.

          Activity

          Hide
          serb Sergey Bylokhov added a comment -
          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.
          Show
          serb Sergey Bylokhov added a comment - 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.
          Hide
          pchelko Petr Pchelko (Inactive) added a comment -
          I'm talking about the occurrences of this pattern:

           if (object) {
                  CFRetain(object); // GC
                  [object release];
          }
          Show
          pchelko Petr Pchelko (Inactive) added a comment - I'm talking about the occurrences of this pattern:  if (object) {         CFRetain(object); // GC         [object release]; }
          Hide
          serb Sergey Bylokhov added a comment -
          And I about "like overridden finalize"
          Show
          serb Sergey Bylokhov added a comment - And I about "like overridden finalize"
          Hide
          pchelko Petr Pchelko (Inactive) added a comment -
          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.
          Show
          pchelko Petr Pchelko (Inactive) added a comment - 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.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/dd81f57256b8
          User: pchelko
          Date: 2014-03-14 11:55:46 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/dd81f57256b8 User: pchelko Date: 2014-03-14 11:55:46 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/dd81f57256b8
          User: lana
          Date: 2014-04-09 18:28:21 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/dd81f57256b8 User: lana Date: 2014-04-09 18:28:21 +0000

            People

            • Assignee:
              pchelko Petr Pchelko (Inactive)
              Reporter:
              pchelko Petr Pchelko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: