basic_ofstream::close

void close();

The member function calls rdbuf()-> close().