If you crash the system later, you know at least that much is guaranteed to be there on disk waiting for you when you reboot.
When you flush a socket, it pushes every last byte you have written so far out the wire, even if it means sending a tiny packet.
When you flush a console, flush guarantees every byte you have written so far is displayed on screen.
Many constructors have an autofush boolean so that, when true, flushes automatically after every write.
flush is analogous to flushing a toilet. It clears the bowl/buffer of accumulated waste/bytes.
You don’t need to flush just prior to close because close handles the flushing.
The catch is flush does not necessarily get all your data on disk. You watch a file being written with flush, and as far as dir is concerned, it stays 0 bytes long. To force what amounts to a close/reopen to ensure your data is on disk in case of a crash, do this periodically.
This page is posted
Optional Replicator mirror
Your face IP:[184.108.40.206]
You are visitor number|