6 Replies Latest reply on Jul 24, 2007 6:34 AM by 791266

    Unclosed File input stream , Any performance implications?

    807605
      Hi,
      I open a file input stream as below and read the contents of a file and exit from the method without closing the input stream [fin.close()].
      1) What are the implications of not closing input stream, performance related?.
      2) Since fin is a local variable once the method terminates the variable will be destroyed, In this do i still need to close the input stream?

      FileInputStream fin = new FileInputStream(file);
      Please advice.
      Thanks
      Deepak