CvGlobals::uninit()
- Defined in
- CvGlobals.cpp, line 2241
- Class
- CvGlobals
- Hook name
CivHooks::CvGlobals_uninit
Hooks
static bool BeforeCvGlobals_uninit(CvGlobals* self);static void AfterCvGlobals_uninit(CvGlobals* self);static void ReplaceCvGlobals_uninit(void (*original)(CvGlobals*), CvGlobals* self);CivRegisterBefore<CivHooks::CvGlobals_uninit>(host, &BeforeCvGlobals_uninit);CivRegisterAfter<CivHooks::CvGlobals_uninit>(host, &AfterCvGlobals_uninit);CivRegisterReplace<CivHooks::CvGlobals_uninit>(host, &ReplaceCvGlobals_uninit);
Code
2238//2239// free2240//2241void CvGlobals::uninit()2242{2243 CvPlayerAI::freeStatics();2244 CvTeam::freeStatics();22452246 SAFE_DELETE(m_pEconomicAIStrategies);2247 SAFE_DELETE(m_pCitySpecializations);2248 SAFE_DELETE(m_pTacticalMoves);2249 SAFE_DELETE(m_pMilitaryAIStrategies);2250 SAFE_DELETE(m_pAIGrandStrategies);2251 SAFE_DELETE(m_pPolicies);2252 SAFE_DELETE(m_pBuildings);2253 SAFE_DELETE(m_pUnits);2254 SAFE_DELETE(m_pProjects);2255 SAFE_DELETE(m_pPromotions);2256 SAFE_DELETE(m_pEmphases);2257 SAFE_DELETE(m_pTraits);2258 SAFE_DELETE(m_pReligions);2259 SAFE_DELETE(m_pBeliefs);2260 SAFE_DELETE(m_pLeagueSpecialSessions);2261 SAFE_DELETE(m_pLeagueNames);2262 SAFE_DELETE(m_pLeagueProjects);2263 SAFE_DELETE(m_pLeagueProjectRewards);2264 SAFE_DELETE(m_pResolutions);2265 SAFE_DELETE(m_pNotifications);2266#if defined(MOD_API_ACHIEVEMENTS) || defined(ACHIEVEMENT_HACKS)2267 SAFE_DELETE(m_pAchievements);2268#endif22692270 SAFE_DELETE(m_pImprovements); // player uses the improvement count in deallocating.2271 SAFE_DELETE(m_pTechs); // improvements uses tech to deallocate. arrghh!22722273 SAFE_DELETE(m_map);2274 SAFE_DELETE(m_game);22752276 SAFE_DELETE(m_asyncRand);22772278 m_kGlobalDefinesLookup.Release();22792280 if(gDLL)2281 gDLL->UninitGlobals(); // free globals allocated outside the dll22822283 SAFE_DELETE(m_pathFinder);2284 SAFE_DELETE(m_interfacePathFinder);2285 SAFE_DELETE(m_ignoreUnitsPathFinder);2286 SAFE_DELETE(m_stepFinder);2287 SAFE_DELETE(m_routeFinder);2288 SAFE_DELETE(m_waterRouteFinder);2289 SAFE_DELETE(m_areaFinder);2290 SAFE_DELETE(m_influenceFinder);2291 SAFE_DELETE(m_buildRouteFinder);2292 SAFE_DELETE(m_internationalTradeRouteLandFinder);2293 SAFE_DELETE(m_internationalTradeRouteWaterFinder);2294 SAFE_DELETE(m_tacticalAnalysisMapFinder);22952296 // already deleted outside of the dll, set to null for safety2297 m_pathFinder=NULL;2298 m_interfacePathFinder=NULL;2299 m_ignoreUnitsPathFinder=NULL;2300 m_stepFinder=NULL;2301 m_routeFinder=NULL;2302 m_waterRouteFinder=NULL;2303 m_areaFinder=NULL;2304 m_influenceFinder=NULL;2305 m_buildRouteFinder = NULL;2306 m_internationalTradeRouteLandFinder = NULL;2307 m_internationalTradeRouteWaterFinder = NULL;2308 m_tacticalAnalysisMapFinder = NULL;23092310}
Calls
- CvGlobals::getDLLIFace()
- CvPlayerAI::freeStatics()
- CvTeam::freeStatics()
Database::Results::ReleaseICvEngineUtility1::UninitGlobalsSAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETESAFE_DELETE