From f8ada4953d8b4e33818c1cd9e654f122a5b0efb6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 16 Dec 2008 15:21:17 +0000 Subject: [PATCH] From Mathias Froehilch, " On OpenThreads win32 implementation we unconditionally unlock a mutex in the destructor. That happens even if the mutex was not locked before. When running a osg application within microsofts application verifier, that software checks tells me that we should not unlock an unlocked mutex. When I look at the posix threads mutex implementation, which does no unlock in the destructor and where it is illegal to destroy a locked mutex, I conclude that it is not needed for an OpenThreads::Mutex to do that unlock in the win32 Mutex destructor. Thus this patch based on rev 9358 removes that additional unlock in the win32 mutex implementations destructor." --- src/OpenThreads/win32/Win32Mutex.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/OpenThreads/win32/Win32Mutex.cpp b/src/OpenThreads/win32/Win32Mutex.cpp index 7fa75b607..81af208bf 100644 --- a/src/OpenThreads/win32/Win32Mutex.cpp +++ b/src/OpenThreads/win32/Win32Mutex.cpp @@ -93,7 +93,6 @@ Mutex::Mutex() { // Use: public. // Mutex::~Mutex() { - unlock(); delete static_cast(_prvData); } //----------------------------------------------------------------------------