WeakHandle and OopHandle release should clear obj pointer

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 21
    • Component/s: hotspot
    • b18

      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);
        }
      }

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

              Created:
              Updated:
              Resolved: