I have witnessed a Delphi 6 program that uses FindFirst()from SysUtilswithin functions. This is a program that runs for several months and performs this operation hundreds of times. Surprisingly, FindClose()nothing is called and nothing bad happens.
FindFirst()
SysUtils
FindClose()
If I understand correctly, the program seems to be losing files. (There TSearchRecis a record in the record THandle. The whole record is discarded, THandlenot closed). The fact is that there seems to be no problem. I used the sysinternal process handler and did not observe the open file descriptor in the file found FindFirst.
TSearchRec
THandle
FindFirst
Any explanation?
, . FindFirst FindClose, . , .
FindClose
, , . , Process Explorer, , . , , , , , , FindClose, .
, , . , FindFirst FindClose, .