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

(memory leaks) An earlier work around cause memory leakage.

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Not verified

      Description

      There was an earlier workaround in awt/2D causes significant memory leakage during the test. See line 306 in win32/native/sun/windows/awt_Graphics.cpp

      void AwtGraphics::SetJavaObject(JNIEnv *env, jobject obj)
      {
          if (obj == NULL && m_javaObject != NULL) {
      /* we are disposing of this, and need to clean up m_javaObject */
      env->SetIntField(m_javaObject, AwtGraphics::pDataID, 0);
      // env->DeleteWeakGlobalRef(m_javaObject);
      /****** The above line cause memory leakage. ******/
          } else if (obj != NULL) {
      /* we are setting m_javaObject */
      ASSERT(JNU_IsInstanceOfByName(env, obj,
      "sun/awt/windows/WGraphics") > 0);
      m_javaObject = env->NewWeakGlobalRef(obj);
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              pcharltosunw Paul Charlton (Inactive)
              Reporter:
              hongzh Hong Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: