From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Smart to put "Flush(myfile)" before "Close(myfile") ?
Date: Tue, 26 Jan 2021 09:01:13 +0100 [thread overview]
Message-ID: <ruoi88$1ht1$1@gioia.aioe.org> (raw)
In-Reply-To: 3202e725-c65b-4937-967b-1efeb291e864n@googlegroups.com
On 2021-01-26 06:30, reinert wrote:
> OBS, me in a state of confusion: I made the original question since the end part of a file were lost (Flush helped to avoid).
> However, I now discovered that the actual file sometimes were not closed :-)
This is what Flush is for. E.g. if you have some trace or log file which
never gets officially closed. Flush sets the file end.
Anyway, you triggered me to find the bug :-)
You can wrap File_Type in a controlled type to ensure Close called from
the Finalize.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2021-01-26 8:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 5:42 Smart to put "Flush(myfile)" before "Close(myfile") ? reinert
2021-01-25 11:41 ` Jeffrey R. Carter
2021-01-25 12:05 ` Dmitry A. Kazakov
2021-01-25 13:32 ` G.B.
2021-01-26 5:30 ` reinert
2021-01-26 8:01 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox