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

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

XMLWordPrintable

    • 2d
    • 1.2fcs
    • x86
    • windows_nt
    • Not verified

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: