What steps will reproduce the problem?
1. Call DokanMain
2. Dismount drive
3. Call DokanMain
4. Dismount drive
Each call to DokanMain will result in one or more handle leaks.
What is the expected output? What do you see instead?
Handles opened by DokanMain should be closed before it returns. By watching
handle count in Process Explorer or Task Manager, you see handle count climbing
each time DokanMain is called.
What version of the product are you using? On what operating system?
0.52
Please provide any additional information below.
I traced the handle leak to the calls to _beginthreadex() in dokan.c. Any
handle returned by _beginthreadex() should be closed with CloseHandle().
To fix this, loop through the threadIds array after all of the threads are
completed and call CloseHandle on each one.
// wait for thread terminations
WaitForMultipleObjects(threadNum, threadIds, TRUE, INFINITE);
for(i = 0; i < threadNum; i++){
CloseHandle(threadIds[i]);
}
Original issue reported on code.google.com by briantho...@gmail.com on 22 Jun 2010 at 4:28
Original issue reported on code.google.com by
briantho...@gmail.com
on 22 Jun 2010 at 4:28