finish removing the SOE memory management

This commit is contained in:
DarthArgus
2016-12-04 00:56:11 +00:00
parent 9f9fed4693
commit f9c0a47a39
113 changed files with 163 additions and 3057 deletions
@@ -174,15 +174,44 @@ Persister::~Persister()
{
DEBUG_FATAL(taskQueue,("Call shutdown() before deleting Persister.\n"));
ServerSnapshotMap::iterator i;
for (i=m_currentSnapshots.begin(); i!=m_currentSnapshots.end(); ++i)
for (auto i = m_currentSnapshots.begin(); i!=m_currentSnapshots.end(); ++i) {
delete i->second;
for (i=m_newObjectSnapshots.begin(); i!=m_newObjectSnapshots.end(); ++i)
i->second = nullptr;
}
for (auto i = m_newObjectSnapshots.begin(); i!=m_newObjectSnapshots.end(); ++i) {
delete i->second;
i->second = nullptr;
}
for (auto i = m_newCharacterSnapshots.begin(); i!=m_newCharacterSnapshots.end(); ++i) {
delete i->second;
i->second = nullptr;
}
for (auto i = m_objectSnapshotMap.begin(); i!=m_objectSnapshotMap.end(); ++i) {
delete i->second;
i->second = nullptr;
}
for (auto i = m_savingSnapshots.begin(); i!=m_savingSnapshots.end(); ++i) {
delete *i;
*i = nullptr;
}
for (auto i = m_savingCharacterSnapshots.begin(); i!=m_savingCharacterSnapshots.end(); ++i) {
delete *i;
*i = nullptr;
}
m_currentSnapshots.clear();
m_newObjectSnapshots.clear();
m_objectSnapshotMap.clear();
delete m_messageSnapshot;
delete m_commoditiesSnapshot;
delete m_arbitraryGameDataSnapshot;
m_messageSnapshot = nullptr;
m_commoditiesSnapshot = nullptr;
m_arbitraryGameDataSnapshot = nullptr;