File needs to be closed on Windows but not on Posix, bug?

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 8 20:14:31 PDT 2014


On Monday, 7 July 2014 at 16:02:33 UTC, Kagamin wrote:
> On Monday, 7 July 2014 at 14:25:54 UTC, Regan Heath wrote:
>> If I had to guess, I would say it would still be possible to 
>> access the file.
>
> It's documented so. I guess, linux implements file deletion 
> with delete-on-close feature too, if it exists, a separate 
> deletion operation is not needed.

It's not really a delete on close. The file system link is 
removed, but there is still a handle open to the location. This 
ends up working more like a GC, file is not returned for reuse 
until there are no more references to it.


More information about the Digitalmars-d-learn mailing list