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

WeakHandle and OopHandle release should clear obj pointer

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 21
    • hotspot
    • b18

    Description

      They clear the handle but not the pointer. They should clear the pointer too so you can test whether the handle is released in some cases.

      inline void OopHandle::release(OopStorage* storage) {
        if (_obj != nullptr) {
          // Clear the OopHandle first
          NativeAccess<>::oop_store(_obj, nullptr);
          storage->release(_obj);
        }
      }

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: