title: do I need to close a std::fstream?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/748014/do-i-need-to-manually-close-a-ifstream">Do I need to manually close a ifstream?</a>  </p>
  </blockquote>
  
  
  
  <p>Do I need to call <code>fstream.close()</code> or is <code>fstream</code> a proper RAII object that closes the stream on destruction?</p>
  
  <p>I have a local <code>std::ofstream</code> object inside a method. Can I assume that the file is always closed after exiting this method without calling close? I could not find documentation of the destructor.</p>