mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-02 03:16:11 -04:00
finish removing the SOE memory management
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user