CPlayback::~CPlayback(void) { m_hWnd = NULL; m_fSpeed = 0.0; m_uiDragPlayTime = 0; m_pPlayBackUserDataRaw = NULL; m_pPlayBackUserDataFrame = NULL; try { if (NULL != m_pPlayBackRawCBMutex) { VOS_DestroyMutex(m_pPlayBackRawCBMutex); m_pPlayBackRawCBMutex = NULL; } if (NULL != m_pPlayBackFrameDecoderCBMutex) { VOS_DestroyMutex(m_pPlayBackFrameDecoderCBMutex); m_pPlayBackFrameDecoderCBMutex = NULL; } RetSet(); //lint !e1506已经实现了虚函数; } catch(...) { } }
CAudioMgr::~CAudioMgr(void) { m_pUserMgr = NULL; try { HandleTalkBackMapIter iter = m_HanleTalkBackMap.begin(); while(m_HanleTalkBackMap.end() != iter) { CAudioObj* pTalkback = dynamic_cast<CAudioObj*>(iter->second);//lint !e611 if (NULL != pTalkback) { IVS_DELETE(pTalkback); } ++iter; } m_HanleTalkBackMap.clear(); if (NULL != m_pHandleTalkBackMutex) { (void)VOS_DestroyMutex(m_pHandleTalkBackMutex); m_pHandleTalkBackMutex = NULL; } } catch (...) { } if (NULL != m_pHandleTalkBackMutex) { VOS_DestroyMutex(m_pHandleTalkBackMutex); m_pHandleTalkBackMutex = NULL; } }
void TimerMgr::uninit() { if (NULL != m_mutex) { (void)VOS_MutexLock(m_mutex); } m_bStop = true; m_TimerMap.clear(); if (NULL != m_mutex) { (void)VOS_MutexUnlock(m_mutex); } if(VOS_NULL != m_threadHandle) { (void)VOS_ThreadJoin(m_threadHandle); m_threadHandle = NULL; } if (VOS_NULL != m_mutex) { (void)VOS_DestroyMutex(m_mutex); m_mutex = NULL; } m_TimerCBFunc = NULL; }
/******************************************************************************* Function: CNVSTimer::exit() Description: 退出定时检测线程 Calls: Called By: Input: 无 Output: 无 Return: 无 *******************************************************************************/ void CNVSTimer::exit() { if(NULL == m_pVosThread) { IVS_RUN_LOG_ERR("NVSTimer exit: m_pVosThread is null"); return; } //先停止线程 this->m_bExit = VOS_TRUE; errno = 0; long ret_val = VOS_ThreadJoin(m_pVosThread); if (ret_val != VOS_OK) { IVS_RUN_LOG_ERR("Wait timer thread exit failed. ret_val(%ld). error(%d):%s", ret_val, errno, strerror(errno)); } //释放内存 VOS_free(m_pVosThread); m_pVosThread = VOS_NULL; //再释放资源 clearTimer(); //释放锁 (void)VOS_DestroyMutex(m_pMutexListOfTrigger); m_pMutexListOfTrigger = VOS_NULL; IVS_DBG_LOG("FILE(%s)LINE(%d): CNVSTimer::exit: exit complete.", _TIMER_FL_); return; };
CRealPlayMgr::~CRealPlayMgr(void) { m_pUserMgr = NULL; if (NULL != m_pHanleRealPlayMutex) { (void)VOS_DestroyMutex(m_pHanleRealPlayMutex); m_pHanleRealPlayMutex = NULL; } }//lint !e1740
CI18N::~CI18N(void) { try { Clear(); VOS_DestroyMutex(m_pMutexLock); m_pMutexLock = NULL; } catch (...) { } }
CTelepresenceMgr::~CTelepresenceMgr(void) { VOS_MutexLock(m_pChannelMapMutex); try { TP_PLAY_CHANNEL_MAP::iterator iter = m_channelMap.begin(); TP_PLAY_CHANNEL_MAP::iterator iter_end = m_channelMap.end(); for(; iter!=iter_end; iter++) { CTPPlayChannel* pChannel = dynamic_cast<CTPPlayChannel*>(iter->second);//lint !e611 IVS_DELETE(pChannel); } } catch (...) { } (void)VOS_MutexUnlock(m_pChannelMapMutex); (void)VOS_DestroyMutex(m_pChannelMapMutex); m_pChannelMapMutex = NULL; m_pUserMgr = NULL; }
TimerMgr::~TimerMgr(void) { try { m_bStop = true; m_TimerMap.clear(); if(VOS_NULL != m_threadHandle) { (void)VOS_ThreadJoin(m_threadHandle); m_threadHandle = NULL; } if (VOS_NULL != m_mutex) { (void)VOS_DestroyMutex(m_mutex); m_mutex = NULL; } m_bStop = false; m_TimerCBFunc = NULL; } catch(...){} }
/******************************************************************************* Function: CNVSTimer::~CNVSTimer() Description: 析构函数 Calls: Called By: Input: 无 Output: 无 Return: 无 *******************************************************************************/ CNVSTimer::~CNVSTimer() { try { if(NULL != m_plistTrigger) { ListOfTriggerIte itListOfTrigger = m_plistTrigger->begin(); IVS_DBG_LOG("FILE(%s)LINE(%d): CNVSTimer::~CNVSTimer: thread = %u", _TIMER_FL_, VOS_pthread_self()); while(itListOfTrigger != m_plistTrigger->end()) { CTimerItem* pTimerItem = (*itListOfTrigger).second;//lint !e64 VOS_DELETE(pTimerItem); pTimerItem = NULL; ++itListOfTrigger; }; m_plistTrigger->clear(); VOS_DELETE(m_plistTrigger); m_plistTrigger = NULL; } if(m_pVosThread != NULL) { VOS_free(m_pVosThread); } m_pVosThread = NULL; if(m_pMutexListOfTrigger != NULL) { (void)VOS_DestroyMutex(m_pMutexListOfTrigger); } m_pMutexListOfTrigger = NULL; } catch (...) { } };
CSDKDecoderMgr::~CSDKDecoderMgr(void) { m_bThreadExit = TRUE; m_pCallBackFun = NULL; m_pUserData = NULL; VOS_ThreadJoin(m_pVosThread); try { CSDKDecoderMgr::RemoveDecMgrObj(this); RemoveDecoderInfo(); } catch (...) { } VOS_DestroyMutex(m_pDecoderInfoMapMutex); m_pDecoderInfoMapMutex = NULL; if(NULL!=m_pVosThread) { VOS_free(m_pVosThread); m_pVosThread = NULL; } }