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

resource depletion should cause finalization

XMLWordPrintable

    • sparc
    • solaris_2.4

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: