VM: fix the sampler_thread handle leak

char-rename
Alexander Iljin 2016-06-02 23:38:08 +03:00 committed by John Benediktsson
parent 0a8070e094
commit 7a94230899
1 changed files with 1 additions and 0 deletions

View File

@ -371,6 +371,7 @@ void factor_vm::end_sampling_profiler_timer() {
WaitForSingleObject(sampler_thread, 3000 * (DWORD) samples_per_second);
if (wait_result != WAIT_OBJECT_0)
TerminateThread(sampler_thread, 0);
CloseHandle(sampler_thread);
sampler_thread = NULL;
}