I've debugged the handle leak in #11 and I've realized that FindClose is never called. If you place a breakpoint at this line it'll never get called:
|
retValue = NativeMethods.FindClose(handle); |
The reason is at the time that function is called, IsClosed is already true, so it never enters the if statement body.
Not sure what's the best way to fix this, perhaps check for IsInvalid instead of IsClosed? Also calling SetHandleAsInvalid(); seemingly does nothing.
@JohnWintellect thanks again for the great tool, I use it daily.
I've debugged the handle leak in #11 and I've realized that FindClose is never called. If you place a breakpoint at this line it'll never get called:
FastFileFinder/FF/SafeFindFileHandle.cs
Line 29 in 293a072
The reason is at the time that function is called,
IsClosedis already true, so it never enters theifstatement body.Not sure what's the best way to fix this, perhaps check for
IsInvalidinstead ofIsClosed? Also callingSetHandleAsInvalid();seemingly does nothing.@JohnWintellect thanks again for the great tool, I use it daily.