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

JNI DefineClass() doc should clarify buffer's "lifecycle"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • generic
    • generic



      Name: krT82822 Date: 11/29/99


      java version "1.2.1"
      Classic VM (build JDK-1.2.1-A, native threads)

      The DefineClass function of the JNI API does not specify lifecycle requirements
      of the raw class data. It takes a jbyte* as input, but there is no indication
      whether it is required that the data pointed to must remain constant beyond the
      call, i.e. whether the VM makes a copy of the buffer or keeps referring to the
      passed in buffer for the lifetime of the defined class.

       To be on the safe side, I have to maintain the buffer, potentially wasting memory if this is not necessary.
      (Review ID: 98397)
      ======================================================================

            asommere Alan Sommerer (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: