zMutex::~zMutex() { sync(); #if defined(_WIN32) DeleteMutex((LPCRITICAL_SECTION)_cs); delete (CRITICAL_SECTION*)_cs; #else int res = pthread_mutex_destroy(&_mutex); CHECK_FATAL(res, "pthread_mutex_destroy"); #endif }
// ------------------------------------------------------------------------------------------------- void PuLogClose(LOG_HANDLE *hHandle) { LockMutex(&hHandle->g_log_mutex); if (hHandle->g_cur_file) { fclose(hHandle->g_cur_file); hHandle->g_cur_file = NULL; } UnlockMute(&hHandle->g_log_mutex); DeleteMutex(&hHandle->g_log_mutex); }
CMyTaskThread::~CMyTaskThread() { DeleteMutex(m_Mutex); DeleteEvent(m_Notify); }