diff options
Diffstat (limited to 'cpp/src/IceUtil/Thread.cpp')
-rw-r--r-- | cpp/src/IceUtil/Thread.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index f2121a1e45c..63ba6ddbdc7 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -15,6 +15,19 @@ using namespace std; #ifdef WIN32 +IceUtil::HandleWrapper::HandleWrapper(HANDLE h) : + handle(h) +{ +} + +IceUtil::HandleWrapper::~HandleWrapper() +{ + if (handle != 0) + { + CloseHandle(handle); + } +} + IceUtil::ThreadControl::ThreadControl() : _handle(new HandleWrapper(0)), _id(GetCurrentThreadId()) |