From d64ed3e699fdf1fecf1b95d842f897d4a5a9d94f Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 28 Sep 2000 00:56:24 +0000 Subject: [PATCH] close the handle --- src/libCom/osi/os/WIN32/osdTime.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libCom/osi/os/WIN32/osdTime.cpp b/src/libCom/osi/os/WIN32/osdTime.cpp index a7955efc6..133b91576 100644 --- a/src/libCom/osi/os/WIN32/osdTime.cpp +++ b/src/libCom/osi/os/WIN32/osdTime.cpp @@ -103,8 +103,8 @@ static void osdTimeInit () LARGE_INTEGER parm; BOOL success; int unixStyleStatus; + HANDLE osdTimeThread; unsigned threadAddr; - unsigned long handle; FILETIME epicsEpochFT; DWORD status; @@ -173,11 +173,14 @@ static void osdTimeInit () // // spawn off a thread which periodically resynchronizes the offset // - handle = _beginthreadex ( NULL, 4096, osdTimeSynchThreadEntry, + osdTimeThread = (HANDLE) _beginthreadex ( NULL, 4096, osdTimeSynchThreadEntry, 0, 0, &threadAddr ); - if ( handle == NULL ) { + if ( osdTimeThread == NULL ) { errlogPrintf ( "osdTimeInit(): unable to start time synch thread\n" ); } + else { + assert ( CloseHandle ( osdTimeThread ) ); + } atexit ( osdTimeExit ); }