Is it really necessary to hide the list of open file descriptors from the GC?
15 Feb
2022
15 Feb
'22
9:25 p.m.
Thanks, this question has been a answered in the meantime.
I'm afraid the reference counter will not solve the issue, because, firstly, one is not asked to call Files.Close, one can just leave the file as is, and in this case the file descriptor will still need to be collected if there are no references to it. And, secondly, Files.Close does not actually "close" the file, but it just flushes the buffers, and after Files.Close the file can be still read from and written to. More calls to Files.Close can be done later. "Close" means "close the buffers".
1744
Age (days ago)
1744
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andreas Pirklbauer