From 4091a61e589debee4a50e8ada80018650a68fc8d Mon Sep 17 00:00:00 2001 From: stofu1234 Date: Fri, 8 Jan 2016 14:03:44 +0900 Subject: [PATCH] fixed event handle leak --- Sshfs/Sshfs/SftpFilesystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sshfs/Sshfs/SftpFilesystem.cs b/Sshfs/Sshfs/SftpFilesystem.cs index 5038924..05a73ac 100644 --- a/Sshfs/Sshfs/SftpFilesystem.cs +++ b/Sshfs/Sshfs/SftpFilesystem.cs @@ -368,6 +368,10 @@ DokanError IDokanOperations.Cleanup(string fileName, DokanFileInfo info) { Log("Cleanup:{0},Delete:{1}", info.Context,info.DeleteOnClose); + GC.Collect(); + GC.WaitForPendingFinalizers(); + GC.Collect(); + if (info.Context != null) { (info.Context as SftpContext).Release();