Fix various memory leaks on exit

This commit is contained in:
Wojtek Figat
2021-03-14 23:58:03 +01:00
parent 76e056698b
commit b2c824b77e
4 changed files with 20 additions and 8 deletions

View File

@@ -182,6 +182,7 @@ WindowsFileSystemWatcher::~WindowsFileSystemWatcher()
FileSystemWatchers::ThreadActive = false;
QueueUserAPC(FileSystemWatchers::StopProc, FileSystemWatchers::Thread->GetHandle(), 0);
FileSystemWatchers::Thread->Join();
Delete(FileSystemWatchers::Thread);
FileSystemWatchers::Thread = nullptr;
}
FileSystemWatchers::Locker.Unlock();