rollback strategy deletion

This commit is contained in:
Yunfan Li
2023-10-14 19:29:53 +08:00
parent 5d3ab08d30
commit c8d223e898

View File

@@ -71,13 +71,13 @@ Engine::~Engine(void)
{ {
Reset(); Reset();
for (std::map<std::string, Strategy*>::iterator i = strategies.begin(); i != strategies.end(); i++) // for (std::map<std::string, Strategy*>::iterator i = strategies.begin(); i != strategies.end(); i++)
{ // {
Strategy* strategy = i->second; // Strategy* strategy = i->second;
if (strategy) { // if (strategy) {
delete strategy; // delete strategy;
} // }
} // }
strategies.clear(); strategies.clear();
} }