mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
修复tc_timer内存泄露
This commit is contained in:
parent
00c4b19c2e
commit
ebeadaf813
@ -195,11 +195,6 @@ protected:
|
||||
shared_ptr<Func> p = wPtr.lock();
|
||||
if(p)
|
||||
{
|
||||
{
|
||||
std::unique_lock <std::mutex> lock(_mutex);
|
||||
_tmpEvent.erase(p->_uniqueId);
|
||||
}
|
||||
|
||||
if (this->exist(p->_uniqueId, true))
|
||||
{
|
||||
if (p->_cron.isset)
|
||||
@ -266,8 +261,6 @@ protected:
|
||||
|
||||
MAP_TIMER _mapTimer; //时间, 事件
|
||||
|
||||
MAP_EVENT _tmpEvent; //id, 事件
|
||||
|
||||
atomic_uint _increaseId = {0};
|
||||
|
||||
set<int64_t> _repeatIds; //循环任务的所有ID
|
||||
|
@ -140,8 +140,6 @@ int64_t TC_TimerBase::fireEvents(int64_t ms)
|
||||
|
||||
func = it->second;
|
||||
|
||||
_tmpEvent[it->first] = it->second;
|
||||
|
||||
_mapEvent.erase(it);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user