3 ms·
Well, for many resources I would agree with you, but for files specifically, closing a file usually does a lot of things, which the article completely forgets a
by tsimionescu 6y ago
Well, for many resources I would agree with you, but for files specifically, closing a file usually does a lot of things, which the article completely forgets about.
In particular, write buffers are almost never flushed unless you do it explicitly or on file handle close.