3 ms·
> Windows does not allocate handles sequentially Indeed it does not, but it's not "random" either, i.e., they do get reused, probably rather quickly, so it doe
by zvrba 4y ago
> Windows does not allocate handles sequentially
Indeed it does not, but it's not "random" either, i.e., they do get reused, probably rather quickly, so it does not solve the problem.
Mark Russinovich or Raymond Chen (I think) had an article about why it's a bad idea to forcibly close files that are in use and they gave exactly that as a reason: the closed handle gets valid again, but for a different object, and, voila - corruption!