Fixed close null mutex and condvar
This commit is contained in:
parent
f022d814e6
commit
c560eabeb2
|
@ -96,7 +96,8 @@ ArchNetAddressImpl::alloc(size_t size)
|
||||||
// ArchNetworkWinsock
|
// ArchNetworkWinsock
|
||||||
//
|
//
|
||||||
|
|
||||||
ArchNetworkWinsock::ArchNetworkWinsock()
|
ArchNetworkWinsock::ArchNetworkWinsock() :
|
||||||
|
m_mutex(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +110,9 @@ ArchNetworkWinsock::~ArchNetworkWinsock()
|
||||||
WSACleanup_winsock = NULL;
|
WSACleanup_winsock = NULL;
|
||||||
s_networkModule = NULL;
|
s_networkModule = NULL;
|
||||||
}
|
}
|
||||||
ARCH->closeMutex(m_mutex);
|
if (m_mutex != NULL) {
|
||||||
|
ARCH->closeMutex(m_mutex);
|
||||||
|
}
|
||||||
|
|
||||||
EventList::iterator it;
|
EventList::iterator it;
|
||||||
for (it = m_unblockEvents.begin(); it != m_unblockEvents.end(); it++) {
|
for (it = m_unblockEvents.begin(); it != m_unblockEvents.end(); it++) {
|
||||||
|
|
|
@ -39,7 +39,10 @@ static const UINT kFirstReceiverID = WM_USER + 14;
|
||||||
ArchTaskBarWindows* ArchTaskBarWindows::s_instance = NULL;
|
ArchTaskBarWindows* ArchTaskBarWindows::s_instance = NULL;
|
||||||
|
|
||||||
ArchTaskBarWindows::ArchTaskBarWindows() :
|
ArchTaskBarWindows::ArchTaskBarWindows() :
|
||||||
m_nextID(kFirstReceiverID)
|
m_nextID(kFirstReceiverID),
|
||||||
|
m_thread(NULL),
|
||||||
|
m_condVar(NULL),
|
||||||
|
m_mutex(NULL)
|
||||||
{
|
{
|
||||||
// save the singleton instance
|
// save the singleton instance
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
@ -52,8 +55,12 @@ ArchTaskBarWindows::~ArchTaskBarWindows()
|
||||||
ARCH->wait(m_thread, -1.0);
|
ARCH->wait(m_thread, -1.0);
|
||||||
ARCH->closeThread(m_thread);
|
ARCH->closeThread(m_thread);
|
||||||
}
|
}
|
||||||
ARCH->closeCondVar(m_condVar);
|
if (m_condVar != NULL) {
|
||||||
ARCH->closeMutex(m_mutex);
|
ARCH->closeCondVar(m_condVar);
|
||||||
|
}
|
||||||
|
if (m_mutex != NULL) {
|
||||||
|
ARCH->closeMutex(m_mutex);
|
||||||
|
}
|
||||||
s_instance = NULL;
|
s_instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue