+// The AIModels manager performs a number of actions upon
+ // Shutdown that implicitly assume that other subsystems
+ // are still operational (Due to the dynamic allocation and
+ // deallocation of AIModel objects. To ensure we can safely
+ // shut down all subsystems, make sure we take down the
+ // AIModels system first.
+ subsystem_mgr->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("ai_model");
+ delete subsystem_mgr;
+ delete event_mgr;
+ delete time_params;
+ delete ephem;
+ delete mag;
+ delete matlib;
+ delete route_mgr;
+ delete current_panel;
+ delete soundmgr;
+ delete airports;
+
+ delete runways;
+ delete ATC_mgr;
+ delete AI_mgr;
+ delete controls;
+ delete viewmgr;
+
+ delete initial_state;
+// //delete locale; Don't delete locale
+// delete commands;
+ delete model_lib;
+ delete acmodel;
+ delete model_mgr;
+ delete channel_options_list;
+ delete initial_waypoints;
+ delete scenery;
+ //delete tile_mgr; // Don't delete tile manager yet, because loader thread problems
+ delete io;
+ delete fontcache;
+
+ delete navlist;
+ delete loclist;
+ delete gslist;
+ delete dmelist;
+ delete mkrlist;
+ delete tacanlist;
+ delete carrierlist;
+ delete channellist;
+ delete fixlist;
+ delete airwaynet;
+ delete multiplayer_mgr;
+
+ delete props;