I have witnessed a Delphi 6 program that uses FindFirst() from SysUtils inside a function. This is a program that runs for months and performs this operation hundreds of times. The surprising thing is that FindClose() is not called and nothing bad happens.
If I understand that correctly, the program seems to leak file Handles. (In the TSearchRec record there is a THandle entry. The whole record is discarded and the THandle not closed). The thing is that there seems to be no problem. I used process explorer form sysinternal and observed no open file handle to the file found by FindFirst.
Any explanation?