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

resource depletion should cause finalization

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.4

      Description

      Some resources can only be reclaimed by finalization. But running out
      does not cause finalization to occur. Sometimes it should.

      For instance, construction a java.io.FileInputStream(String) does a
      Unix open, and associates a Unix file with the FileInputStream object.
      Unless an explicit close() is done on the FileInputStream, the Unix
      file is not closed until finalization, even if the FileInputStream
      object has been discarded. A program can get a IOException when
      creating one too many of these, even if most are discarded.

      If the FileInputStream gets EMFILE on open, it should call the
      finalizer to see if that frees any Unix file descriptors, then try
      opening again.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              apalanissunw Anand Palaniswamy (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: