2 ms·
Fstream is hardly a paragon of good design. Then again there is no reason to call close in the destructor as fstream destructor itself will call close. If you
by gpderetta 7y ago
Fstream is hardly a paragon of good design. Then again there is no reason to call close in the destructor as fstream destructor itself will call close.
If you care about reliability and want to make sure your stream is flushed, you probably want an explicit commit interface and reserve the destructor for rollback (which necessarily shouldn't possibly fail).