To close a filebuf stream without destroying it.
basic_filebuf<charT, traits>* close();
The function close() would remove the stream from memory but will not remove the filebuf object. You may re-open a filebuf stream that was closed using the close() function.
The this pointer is returned with success, otherwise a null pointer is returned.
For example of basic_filebuf::close() usage see basic_filebuf::open().