ATIS_mgr( NULL ),
controls( NULL ),
viewmgr( NULL ),
- commands( SGCommandMgr::instance() ),
+ commands( new SGCommandMgr ),
channel_options_list( NULL ),
initial_waypoints( NULL ),
fontcache ( new FGFontCache ),
subsystem_mgr = NULL; // important so ::get_subsystem returns NULL
delete time_params;
- delete matlib;
+ set_matlib(NULL);
delete route_mgr;
delete ATIS_mgr;
delete channel_options_list;
locale = NULL;
props.clear();
+
+ delete commands;
}
// set the fg_root path
{
delete locale;
-#if DEBUG_RESET
SG_LOG(SG_GENERAL, SG_INFO, "root props refcount:" << props.getNumRefs());
treeDumpRefCounts(0, props);
-#endif
+
props = new SGPropertyNode;
initProperties();
locale = new FGLocale(props);
_tile_mgr = t;
}
+void FGGlobals::set_matlib( SGMaterialLib *m )
+{
+ if (matlib)
+ delete matlib;
+ matlib = m;
+}
+
// end of globals.cxx