ppInfoList deletes its elements on destruction, and we didn't clear our
temporary list after deleting its elements manually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22534 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1279,13 +1279,16 @@ TRoster::CheckSanity()
|
|||||||
if (!(*it)->IsRunning())
|
if (!(*it)->IsRunning())
|
||||||
obsoleteApps.AddInfo(*it);
|
obsoleteApps.AddInfo(*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove the apps
|
// remove the apps
|
||||||
for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) {
|
for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) {
|
||||||
RemoveApp(*it);
|
RemoveApp(*it);
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
|
obsoleteApps.MakeEmpty(false);
|
||||||
|
// don't delete infos a second time
|
||||||
|
|
||||||
// early pre-registered applications
|
// early pre-registered applications
|
||||||
obsoleteApps.MakeEmpty();
|
|
||||||
bigtime_t timeLimit = system_time() - kMaximalEarlyPreRegistrationPeriod;
|
bigtime_t timeLimit = system_time() - kMaximalEarlyPreRegistrationPeriod;
|
||||||
for (AppInfoList::Iterator it = fEarlyPreRegisteredApps.It();
|
for (AppInfoList::Iterator it = fEarlyPreRegisteredApps.It();
|
||||||
it.IsValid();
|
it.IsValid();
|
||||||
@@ -1293,11 +1296,14 @@ TRoster::CheckSanity()
|
|||||||
if ((*it)->registration_time < timeLimit)
|
if ((*it)->registration_time < timeLimit)
|
||||||
obsoleteApps.AddInfo(*it);
|
obsoleteApps.AddInfo(*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove the apps
|
// remove the apps
|
||||||
for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) {
|
for (AppInfoList::Iterator it = obsoleteApps.It(); it.IsValid(); ++it) {
|
||||||
fEarlyPreRegisteredApps.RemoveInfo(*it);
|
fEarlyPreRegisteredApps.RemoveInfo(*it);
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
|
obsoleteApps.MakeEmpty(false);
|
||||||
|
// don't delete infos a second time
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetShuttingDown
|
// SetShuttingDown
|
||||||
|
|||||||
Reference in New Issue
Block a user