/** ** Free all AI resources. */ void FreeAi() { CleanAi(); // Free AiTypes. for (unsigned int i = 0; i < AiTypes.size(); ++i) { CAiType *aitype = AiTypes[i]; delete aitype; } AiTypes.clear(); // Free AiHelpers. AiHelpers.Train.clear(); AiHelpers.Build.clear(); AiHelpers.Upgrade.clear(); AiHelpers.Research.clear(); AiHelpers.Repair.clear(); AiHelpers.UnitLimit.clear(); AiHelpers.Equiv.clear(); AiHelpers.Refinery.clear(); AiHelpers.Depots.clear(); AiResetUnitTypeEquiv(); }
/** ** Free all AI resources. */ void FreeAi() { CleanAi(); // // Free AiTypes. // for (size_t i = 0; i < AiTypes.size(); ++i) { delete AiTypes[i]; } AiTypes.clear(); // // Free AiHelpers. // AiHelpers.Train.clear(); AiHelpers.Build.clear(); AiHelpers.Repair.clear(); AiHelpers.UnitLimit.clear(); AiHelpers.Equiv.clear(); AiResetUnitTypeEquiv(); }