#include "stdafx.h" #include "EventQueue.h" #include "msgdef.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif CEventQueue::CEventQueue() { } CEventQueue::~CEventQueue() { Clear(); } /************************************************************************/ /* 函数:ClearEvent 描述:清除事件 参数: 返回:1成功,0失败 */ /************************************************************************/ void CEventQueue::Clear() { CAutoLock autolock(&m_l); std::list::iterator it = m_list.begin(); for(;it != m_list.end();) { LPSEVENT lp = (*it); if(lp != NULL) delete lp; ++it; } m_list.clear(); }