Windows: Close handle to thread checking for adopted threads.

Task-number: QTBUG-34840

[ChangeLog][QtCore][QThread][Windows][QTBUG-34840] Fix handle leak.

Change-Id: I537c1c81a43907f01a81be740746582266969c6f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
bb10
Friedemann Kleint 2013-11-20 13:37:48 +01:00 committed by The Qt Project
parent 58f0a9ba5a
commit 0da841bc33
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread)
qt_adopted_thread_handles.prepend(qt_adopted_thread_wakeup);
}
CreateThread(0, 0, qt_adopted_thread_watcher_function, 0, 0, &qt_adopted_thread_watcher_id);
CloseHandle(CreateThread(0, 0, qt_adopted_thread_watcher_function, 0, 0, &qt_adopted_thread_watcher_id));
} else {
SetEvent(qt_adopted_thread_wakeup);
}