In Restart Thread win32.cxx
void PThread::Restart()
{
PAssert(IsTerminated(), "Cannot restart running thread");
here close old handle.....
#ifndef _WIN32_WCE
threadHandle = (HANDLE)_beginthreadex(NULL,
originalStackSize,
MainFunction, this, 0, &threadId);
#else
threadHandle = CreateThread(NULL, originalStackSize,
(LPTHREAD_START_ROUTINE) MainFunction,
this, 0, (LPDWORD) &threadId);
#endif
PAssertOS(threadHandle != NULL);
}
I think that you should call CloseHandle to free system
resource of previous started thread.
Nobody/Anonymous
None
None
Public