NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Bob Simons wrote:
I looked in the source code for the java.io.FileInputStream (as an example) to see if Java's file classes use the finalize() method. They do./*** Ensures that the <code>close</code> method of this file input stream is* called when there are no more references to it. * * @exception IOException if an I/O error occurs. * @see java.io.FileInputStream#close() */ protected void finalize() throws IOException { if (fd != null) { if (fd != fd.in) { close(); } } }So I don't yet know what Josh Bloch's book says specifically, but Sun uses the finalize method in the actual Java code.Sincerely, Bob Simons Satellite Data Product Manager Environmental Research Division NOAA Southwest Fisheries Science Center 1352 Lighthouse Ave Pacific Grove, CA 93950-2079 (831)648-0272 bob.simons@xxxxxxxx <>< <>< <>< <>< <>< <>< <>< <>< <><
netcdf-java
archives: