mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7726] Fixed memory leak in InstanceSaveMgr.
This commit is contained in:
parent
14b49d1fd6
commit
995988039b
2 changed files with 7 additions and 2 deletions
|
|
@ -550,7 +550,12 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
|
|||
Group *group = *(gList.begin());
|
||||
group->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true);
|
||||
}
|
||||
m_instanceSaveById.erase(itr++);
|
||||
InstanceSaveHashMap::iterator next;
|
||||
next = itr;
|
||||
++next;
|
||||
delete itr->second;
|
||||
m_instanceSaveById.erase(itr);
|
||||
itr = next;
|
||||
lock_instLists = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue