mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-14 23:07:48 -04:00
readd the delete - this branch i'm not sure if we need or not, same goes
for smart ptr branch
This commit is contained in:
@@ -602,6 +602,8 @@ void Persister::saveCompleted(Snapshot *completedSnapshot)
|
||||
SnapshotListType::iterator i=std::remove(m_savingSnapshots.begin(),m_savingSnapshots.end(),completedSnapshot);
|
||||
if (i!=m_savingSnapshots.end())
|
||||
{
|
||||
delete completedSnapshot;
|
||||
|
||||
m_savingSnapshots.erase(i, m_savingSnapshots.end());
|
||||
if (m_savingSnapshots.empty() && ConfigServerDatabase::getReportSaveTimes())
|
||||
{
|
||||
@@ -634,6 +636,8 @@ void Persister::saveCompleted(Snapshot *completedSnapshot)
|
||||
{
|
||||
SnapshotListType::iterator j=std::remove(m_savingCharacterSnapshots.begin(),m_savingCharacterSnapshots.end(),completedSnapshot);
|
||||
DEBUG_FATAL(i==m_savingCharacterSnapshots.end(),("Programmer bug: SaveCompleted() called with a snapshot that wasn't in m_savingSnapshots or m_savingCharacterSnapshots."));
|
||||
delete completedSnapshot;
|
||||
|
||||
m_savingCharacterSnapshots.erase(j, m_savingCharacterSnapshots.end());
|
||||
DEBUG_REPORT_LOG(ConfigServerDatabase::getReportSaveTimes(),("New character save completed\n"));
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ Snapshot::~Snapshot()
|
||||
*j = nullptr;
|
||||
}
|
||||
|
||||
m_locatorList.clear();
|
||||
m_customStepList.clear();
|
||||
|
||||
++ms_deletionCount;
|
||||
LOG("Snapshot",("Deleted snapshot. %i outstanding, %i created, %i deleted", ms_creationCount-ms_deletionCount,ms_creationCount,ms_deletionCount));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user