The member function closes the stream but does not destroy it.
void close();
Use the function close() to close a stream. It may be re-opened at a later time using the member function open(). If failure occurs open() calls setstate(failbit) which may throw an exception.
There is no return.
For example of basic_ofstream::close() usage see basic_ofstream().