diff --git a/src/runtime/thread.cpp b/src/runtime/thread.cpp index d661a8f351..4b5dd20629 100644 --- a/src/runtime/thread.cpp +++ b/src/runtime/thread.cpp @@ -95,6 +95,10 @@ struct lthread::imp { } } + ~imp() { + CloseHandle(m_thread); + } + void join() { if (WaitForSingleObject(m_thread, INFINITE) == WAIT_FAILED) { throw exception("failed to join thread");