From: ehofman Date: Wed, 8 Feb 2006 10:25:56 +0000 (+0000) Subject: Mathias Fröhlich: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a47725e92f90eed25bbbb8eeb28aa1b9805ba694;p=flightgear.git Mathias Fröhlich: Make use of the automatic reference counting class for ssg* data in flightgear. --- diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index e816b232b..51a959e40 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -51,7 +51,6 @@ const double FGAIBase::lbs_to_slugs = 0.031080950172; //conversion factor FGAIBase::FGAIBase() : fp( NULL ), - model( NULL ), props( NULL ), manager( NULL ), _refID( _newAIModelID() ) @@ -82,8 +81,6 @@ FGAIBase::~FGAIBase() { root->removeChild(_type_str.c_str(), index); delete fp; fp = NULL; - ssgDeRefDelete(model); - model = 0; } void FGAIBase::update(double dt) { @@ -151,7 +148,6 @@ ssgBranch * FGAIBase::load3DModel(const string& fg_root, // some more code here to check whether a model with this name has already been loaded // if not load it, otherwise, get the memory pointer and do something like // SetModel as in ATC/AIEntity.cxx - //SSGBranch *model; model = manager->getModel(path); if (!(model)) { @@ -161,17 +157,7 @@ ssgBranch * FGAIBase::load3DModel(const string& fg_root, sim_time_sec); manager->setModel(path, model); } - //else - // { - // model->ref(); - // aip.init(model); - // aip.setVisible(false); - // globals->get_scenery()->get_scene_graph()->addKid(aip.getSceneGraph()); - // do some setModel stuff. - if (model) - model->ref(); - return model; } diff --git a/src/AIModel/AIBase.hxx b/src/AIModel/AIBase.hxx index 4d1f630b1..02b9e07e0 100644 --- a/src/AIModel/AIBase.hxx +++ b/src/AIModel/AIBase.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include
@@ -180,7 +181,7 @@ protected: string model_path; //Path to the 3D model - ssgBranch * model; //The 3D model object + ssgSharedPtr model; //The 3D model object SGModelPlacement aip; bool delete_me; bool invisible; diff --git a/src/AIModel/AIManager.cxx b/src/AIModel/AIManager.cxx index 84f22ebf1..0047d0199 100644 --- a/src/AIModel/AIManager.cxx +++ b/src/AIModel/AIManager.cxx @@ -59,12 +59,6 @@ FGAIManager::~FGAIManager() { ++ai_list_itr; } ai_list.clear(); - ModelVecIterator i = loadedModels.begin(); - while (i != loadedModels.end()) - { - ssgDeRefDelete(i->getModelId()); - ++i; - } } @@ -445,8 +439,6 @@ ssgBranch * FGAIManager::getModel(const string& path) const void FGAIManager::setModel(const string& path, ssgBranch *model) { - if (model) - model->ref(); loadedModels.push_back(FGModelID(path,model)); } diff --git a/src/AIModel/AIManager.hxx b/src/AIModel/AIManager.hxx index 66c89a2f4..1c57df03a 100644 --- a/src/AIModel/AIManager.hxx +++ b/src/AIModel/AIManager.hxx @@ -26,6 +26,7 @@ #include #include +#include #include
@@ -42,7 +43,7 @@ SG_USING_STD(vector); class FGModelID { private: - ssgBranch * model; + ssgSharedPtr model; string path; public: FGModelID(const string& pth, ssgBranch * mdl) { path =pth; model=mdl;}; diff --git a/src/ATC/AIEntity.cxx b/src/ATC/AIEntity.cxx index efcaaee1c..c8aeab1e3 100644 --- a/src/ATC/AIEntity.cxx +++ b/src/ATC/AIEntity.cxx @@ -45,7 +45,6 @@ FGAIEntity::FGAIEntity() { FGAIEntity::~FGAIEntity() { //cout << "FGAIEntity dtor called..." << endl; - ssgDeRefDelete(_model); // Ought to check valid? //cout << "Removing model from scene graph..." << endl; globals->get_scenery()->get_scene_graph()->removeKid(_aip.getSceneGraph()); // Unregister that one at the scenery manager @@ -56,7 +55,6 @@ FGAIEntity::~FGAIEntity() { void FGAIEntity::SetModel(ssgBranch* model) { _model = model; - _model->ref(); _aip.init(_model); _aip.setVisible(false); globals->get_scenery()->get_scene_graph()->addKid(_aip.getSceneGraph()); diff --git a/src/ATC/AIEntity.hxx b/src/ATC/AIEntity.hxx index 43da25d53..9f2870dfa 100644 --- a/src/ATC/AIEntity.hxx +++ b/src/ATC/AIEntity.hxx @@ -24,8 +24,10 @@ #include #include #include +#include -class ssgBranch; + +class ssgBase; /***************************************************************** @@ -65,7 +67,7 @@ protected: double _pitch; //degrees char* _model_path; //Path to the 3D model - ssgBranch* _model; // Pointer to the model + ssgSharedPtr _model; // Pointer to the model SGModelPlacement _aip; void Transform(); diff --git a/src/ATC/AILocalTraffic.cxx b/src/ATC/AILocalTraffic.cxx index 997db2a94..29dda83d3 100644 --- a/src/ATC/AILocalTraffic.cxx +++ b/src/ATC/AILocalTraffic.cxx @@ -61,7 +61,6 @@ FGAILocalTraffic::FGAILocalTraffic() { globals->get_sim_time_sec() ); *//* _model = model; - _model->ref(); _aip.init(_model); */ //SetModel(model); @@ -125,7 +124,6 @@ FGAILocalTraffic::FGAILocalTraffic() { } FGAILocalTraffic::~FGAILocalTraffic() { - //_model->deRef(); } void FGAILocalTraffic::GetAirportDetails(const string& id) { diff --git a/src/ATC/AIMgr.cxx b/src/ATC/AIMgr.cxx index 4fdc5eec2..0edc4738e 100644 --- a/src/ATC/AIMgr.cxx +++ b/src/ATC/AIMgr.cxx @@ -56,8 +56,6 @@ FGAIMgr::FGAIMgr() { } FGAIMgr::~FGAIMgr() { - ssgDeRefDelete(_defaultModel); - if(_havePiperModel) ssgDeRefDelete(_piperModel); } void FGAIMgr::init() { @@ -105,10 +103,6 @@ void FGAIMgr::init() { _havePiperModel = false; } - // We need to keep one ref of the models open to stop ssg deleting them behind our back! - _defaultModel->ref(); - if(_havePiperModel) _piperModel->ref(); - // go through the $FG_ROOT/ATC directory and find all *.taxi files SGPath path(globals->get_fg_root()); path.append("ATC/"); diff --git a/src/ATC/AIMgr.hxx b/src/ATC/AIMgr.hxx index 885536dd5..f8456ba3e 100644 --- a/src/ATC/AIMgr.hxx +++ b/src/ATC/AIMgr.hxx @@ -23,6 +23,7 @@ #define _FG_AIMGR_HXX #include +#include #include
@@ -109,8 +110,8 @@ public: private: - ssgBranch* _defaultModel; // Cessna 172! - ssgBranch* _piperModel; // pa28-161 + ssgSharedPtr _defaultModel; // Cessna 172! + ssgSharedPtr _piperModel; // pa28-161 bool initDone; // Hack - guard against update getting called before init diff --git a/src/Instrumentation/wxradar.cxx b/src/Instrumentation/wxradar.cxx index ad4d3db0c..629f9abe1 100644 --- a/src/Instrumentation/wxradar.cxx +++ b/src/Instrumentation/wxradar.cxx @@ -70,8 +70,6 @@ wxRadarBg::wxRadarBg () wxRadarBg::~wxRadarBg () { - ssgDeRefDelete(resultTexture); - ssgDeRefDelete(wxEcho); } void @@ -83,12 +81,10 @@ wxRadarBg::init () _Instrument = fgGetNode(branch.c_str(), num, true ); _serviceable_node = _Instrument->getChild("serviceable", 0, true); resultTexture = FGTextureManager::createTexture( odgauge_name ); - resultTexture->ref(); SGPath tpath(globals->get_fg_root()); tpath.append("Aircraft/Instruments/Textures/wxecho.rgb"); // no mipmap or else alpha will mix with pixels on the border of shapes, ruining the effect wxEcho = new ssgTexture( tpath.c_str(), false, false, false); - wxEcho->ref(); _Instrument->setFloatValue("trk", 0.0); _Instrument->setFloatValue("tilt", 0.0); diff --git a/src/Instrumentation/wxradar.hxx b/src/Instrumentation/wxradar.hxx index 3939977f0..1af69a5ac 100644 --- a/src/Instrumentation/wxradar.hxx +++ b/src/Instrumentation/wxradar.hxx @@ -26,6 +26,7 @@ #include #include #include +#include class ssgTexture; class FGODGauge; @@ -49,8 +50,8 @@ private: SGPropertyNode_ptr _serviceable_node; SGPropertyNode_ptr _Instrument; - ssgTexture *resultTexture; - ssgTexture *wxEcho; + ssgSharedPtr resultTexture; + ssgSharedPtr wxEcho; string last_switchKnob; bool sim_init_done; FGODGauge *odg; diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 7ccd7a754..f4a264258 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -116,10 +116,10 @@ sgMat4 copy_of_ssgOpenGLAxisSwapMatrix = { 0.0f, 0.0f, 0.0f, 1.0f } }; -ssgSimpleState *cloud3d_imposter_state; -ssgSimpleState *default_state; -ssgSimpleState *hud_and_panel; -ssgSimpleState *menus; +ssgSharedPtr cloud3d_imposter_state; +ssgSharedPtr default_state; +ssgSharedPtr hud_and_panel; +ssgSharedPtr menus; SGShadowVolume *shadows; @@ -141,7 +141,6 @@ FGRenderer::~FGRenderer() void FGRenderer::build_states( void ) { default_state = new ssgSimpleState; - default_state->ref(); default_state->disable( GL_TEXTURE_2D ); default_state->enable( GL_CULL_FACE ); default_state->enable( GL_COLOR_MATERIAL ); @@ -153,7 +152,6 @@ FGRenderer::build_states( void ) { default_state->disable( GL_LIGHTING ); cloud3d_imposter_state = new ssgSimpleState; - cloud3d_imposter_state->ref(); cloud3d_imposter_state->enable( GL_TEXTURE_2D ); cloud3d_imposter_state->enable( GL_CULL_FACE ); cloud3d_imposter_state->enable( GL_COLOR_MATERIAL ); @@ -167,14 +165,12 @@ FGRenderer::build_states( void ) { cloud3d_imposter_state->disable( GL_LIGHTING ); hud_and_panel = new ssgSimpleState; - hud_and_panel->ref(); hud_and_panel->disable( GL_CULL_FACE ); hud_and_panel->disable( GL_TEXTURE_2D ); hud_and_panel->disable( GL_LIGHTING ); hud_and_panel->enable( GL_BLEND ); menus = new ssgSimpleState; - menus->ref(); menus->disable( GL_CULL_FACE ); menus->disable( GL_TEXTURE_2D ); menus->enable( GL_BLEND ); diff --git a/src/Model/acmodel.hxx b/src/Model/acmodel.hxx index e15705374..bee322e8b 100644 --- a/src/Model/acmodel.hxx +++ b/src/Model/acmodel.hxx @@ -17,6 +17,7 @@ SG_USING_STD(string); SG_USING_STD(vector); #include // for SGSubsystem +#include // Don't pull in the headers, since we don't need them here. @@ -43,8 +44,8 @@ public: private: SGModelPlacement * _aircraft; - ssgSelector * _selector; - ssgRoot * _scene; + ssgSharedPtr _selector; + ssgSharedPtr _scene; float _nearplane; float _farplane; diff --git a/src/Model/modelmgr.hxx b/src/Model/modelmgr.hxx index 41376f47d..179d20c08 100644 --- a/src/Model/modelmgr.hxx +++ b/src/Model/modelmgr.hxx @@ -90,7 +90,7 @@ private: vector _instances; - ssgSelector * _selector; + ssgSharedPtr _selector; }; diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx index 2b97835d2..e0acaaef1 100644 --- a/src/Scenery/scenery.cxx +++ b/src/Scenery/scenery.cxx @@ -112,7 +112,6 @@ void FGScenery::set_center( const Point3D& p ) { } void FGScenery::register_placement_transform(ssgPlacementTransform *trans) { - trans->ref(); _placement_list.push_back(trans); sgdVec3 c; sgdSetVec3(c, center.x(), center.y(), center.z()); @@ -124,7 +123,6 @@ void FGScenery::unregister_placement_transform(ssgPlacementTransform *trans) { while (it != _placement_list.end()) { if ((*it) == trans) { it = _placement_list.erase(it); - ssgDeRefDelete(trans); } else ++it; } @@ -155,7 +153,7 @@ FGScenery::get_cart_elevation_m(const sgdVec3& pos, double max_altoff, Point3D ppos(pos[0], pos[1], pos[2]); if (30.0*30.0 < ppos.distance3Dsquared(center)) { set_center( ppos ); - replaced_center = false; + replaced_center = true; } } diff --git a/src/Scenery/scenery.hxx b/src/Scenery/scenery.hxx index 996eb8ddc..2042085ca 100644 --- a/src/Scenery/scenery.hxx +++ b/src/Scenery/scenery.hxx @@ -36,12 +36,13 @@ #include #include #include +#include +#include SG_USING_STD(list); class ssgRoot; class ssgBranch; -class ssgPlacementTransform; // Define a structure containing global scenery parameters @@ -57,17 +58,17 @@ class FGScenery : public SGSubsystem { double sun_angle; // SSG scene graph - ssgRoot *scene_graph; - ssgBranch *terrain_branch; - ssgRoot *gnd_lights_root; - ssgRoot *vasi_lights_root; - ssgRoot *rwy_lights_root; - ssgRoot *taxi_lights_root; - ssgBranch *models_branch; - ssgBranch *aircraft_branch; + ssgSharedPtr scene_graph; + ssgSharedPtr terrain_branch; + ssgSharedPtr gnd_lights_root; + ssgSharedPtr vasi_lights_root; + ssgSharedPtr rwy_lights_root; + ssgSharedPtr taxi_lights_root; + ssgSharedPtr models_branch; + ssgSharedPtr aircraft_branch; // list of all placement transform, used to move the scenery center on the fly. - typedef list placement_list_type; + typedef list > placement_list_type; placement_list_type _placement_list; public: diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 329ae4345..4d3f7008a 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -201,16 +201,6 @@ static void my_remove_branch( ssgBranch * branch ) { // is intended to spread the load of freeing a complex tile out over // several frames. static int fgPartialFreeSSGtree( ssgBranch *b, int n ) { - -#if 0 - // for testing: we could call the following two lines and replace - // the functionality of this entire function and everything will - // get properly freed, but it will happen all at once and could - // cause a huge frame rate hit. - ssgDeRefDelete( b ); - return 0; -#endif - int num_deletes = 0; if ( n > 0 ) { @@ -264,7 +254,7 @@ bool FGTileEntry::free_tile() { // disconnected from the scene graph) SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING terra_transform" ); if ( fgPartialFreeSSGtree( terra_transform, delete_size ) == 0 ) { - ssgDeRefDelete( terra_transform ); + terra_transform = 0; free_tracker |= TERRA_NODE; } } else if ( !(free_tracker & GROUND_LIGHTS) && gnd_lights_transform ) { @@ -272,7 +262,7 @@ bool FGTileEntry::free_tile() { // disconnected from the scene graph) SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING gnd_lights_transform" ); if ( fgPartialFreeSSGtree( gnd_lights_transform, delete_size ) == 0 ) { - ssgDeRefDelete( gnd_lights_transform ); + gnd_lights_transform = 0; free_tracker |= GROUND_LIGHTS; } } else if ( !(free_tracker & VASI_LIGHTS) && vasi_lights_selector ) { @@ -280,7 +270,7 @@ bool FGTileEntry::free_tile() { // been disconnected from the scene graph) SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING vasi_lights_selector" ); if ( fgPartialFreeSSGtree( vasi_lights_selector, delete_size ) == 0 ) { - ssgDeRefDelete( vasi_lights_selector ); + vasi_lights_selector = 0; free_tracker |= VASI_LIGHTS; } } else if ( !(free_tracker & RWY_LIGHTS) && rwy_lights_selector ) { @@ -288,7 +278,7 @@ bool FGTileEntry::free_tile() { // been disconnected from the scene graph) SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING rwy_lights_selector" ); if ( fgPartialFreeSSGtree( rwy_lights_selector, delete_size ) == 0 ) { - ssgDeRefDelete( rwy_lights_selector ); + rwy_lights_selector = 0; free_tracker |= RWY_LIGHTS; } } else if ( !(free_tracker & TAXI_LIGHTS) && taxi_lights_selector ) { @@ -296,7 +286,7 @@ bool FGTileEntry::free_tile() { // disconnected from the scene graph) SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING taxi_lights_selector" ); if ( fgPartialFreeSSGtree( taxi_lights_selector, delete_size ) == 0 ) { - ssgDeRefDelete( taxi_lights_selector ); + taxi_lights_selector = 0; free_tracker |= TAXI_LIGHTS; } } else if ( !(free_tracker & LIGHTMAPS) ) { @@ -798,21 +788,19 @@ FGTileEntry::load( const string_list &path_list, bool is_base ) if (found_tile_base) { // load tile if found ... - ssgBranch *geometry = new ssgBranch; + ssgSharedPtr geometry = new ssgBranch; if ( obj_load( object_base.str(), geometry, NULL, NULL, NULL, light_pts, true ) ) { geometry->getKid( 0 )->setTravCallback(SSG_CALLBACK_PRETRAV, &FGTileMgr::tile_filter_cb); new_tile -> addKid( geometry ); - } else { - delete geometry; } } else { // ... or generate an ocean tile on the fly SG_LOG(SG_TERRAIN, SG_INFO, " Generating ocean tile"); - ssgBranch *geometry = new ssgBranch; + ssgSharedPtr geometry = new ssgBranch; Point3D c; double br; if ( sgGenTile( path_list[0], tile_bucket, &c, &br, @@ -821,7 +809,6 @@ FGTileEntry::load( const string_list &path_list, bool is_base ) bounding_radius = br; new_tile -> addKid( geometry ); } else { - delete geometry; SG_LOG( SG_TERRAIN, SG_ALERT, "Warning: failed to generate ocean tile!" ); } @@ -836,10 +823,10 @@ FGTileEntry::load( const string_list &path_list, bool is_base ) SGPath custom_path = obj->path; custom_path.append( obj->name ); - ssgBranch *geometry = new ssgBranch; - ssgBranch *vasi_lights = new ssgBranch; - ssgBranch *rwy_lights = new ssgBranch; - ssgBranch *taxi_lights = new ssgBranch; + ssgSharedPtr geometry = new ssgBranch; + ssgSharedPtr vasi_lights = new ssgBranch; + ssgSharedPtr rwy_lights = new ssgBranch; + ssgSharedPtr taxi_lights = new ssgBranch; if ( obj_load( custom_path.str(), geometry, vasi_lights, rwy_lights, @@ -850,30 +837,16 @@ FGTileEntry::load( const string_list &path_list, bool is_base ) SSG_CALLBACK_PRETRAV, &FGTileMgr::tile_filter_cb ); new_tile -> addKid( geometry ); - } else { - delete geometry; } if ( vasi_lights -> getNumKids() > 0 ) vasi_lights_transform -> addKid( vasi_lights ); - else - delete vasi_lights; if ( rwy_lights -> getNumKids() > 0 ) rwy_lights_transform -> addKid( rwy_lights ); - else - delete rwy_lights; if ( taxi_lights -> getNumKids() > 0 ) taxi_lights_transform -> addKid( taxi_lights ); - else - delete taxi_lights; - - } else { - delete geometry; - delete vasi_lights; - delete rwy_lights; - delete taxi_lights; } @@ -1017,7 +990,6 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch, } #endif - terra_transform->ref(); terrain_branch->addKid( terra_transform ); globals->get_scenery()->register_placement_transform(terra_transform); @@ -1030,7 +1002,6 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch, if ( gnd_lights_transform != NULL ) { // bump up the ref count so we can remove this later without // having ssg try to free the memory. - gnd_lights_transform->ref(); gnd_lights_branch->addKid( gnd_lights_transform ); globals->get_scenery()->register_placement_transform(gnd_lights_transform); } @@ -1038,7 +1009,6 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch, if ( vasi_lights_transform != NULL ) { // bump up the ref count so we can remove this later without // having ssg try to free the memory. - vasi_lights_selector->ref(); vasi_lights_selector->addKid( vasi_lights_transform ); globals->get_scenery()->register_placement_transform(vasi_lights_transform); vasi_lights_branch->addKid( vasi_lights_selector ); @@ -1047,7 +1017,6 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch, if ( rwy_lights_transform != NULL ) { // bump up the ref count so we can remove this later without // having ssg try to free the memory. - rwy_lights_selector->ref(); rwy_lights_selector->addKid( rwy_lights_transform ); globals->get_scenery()->register_placement_transform(rwy_lights_transform); rwy_lights_branch->addKid( rwy_lights_selector ); @@ -1056,7 +1025,6 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch, if ( taxi_lights_transform != NULL ) { // bump up the ref count so we can remove this later without // having ssg try to free the memory. - taxi_lights_selector->ref(); taxi_lights_selector->addKid( taxi_lights_transform ); globals->get_scenery()->register_placement_transform(taxi_lights_transform); taxi_lights_branch->addKid( taxi_lights_selector ); diff --git a/src/Scenery/tileentry.hxx b/src/Scenery/tileentry.hxx index e7f6fd3b2..e60f4107b 100644 --- a/src/Scenery/tileentry.hxx +++ b/src/Scenery/tileentry.hxx @@ -41,6 +41,8 @@ #include #include #include +#include +#include #if defined( sgi ) #include @@ -58,7 +60,6 @@ typedef point_list::const_iterator const_point_list_iterator; class ssgLeaf; class ssgBranch; class ssgTransform; -class ssgPlacementTransform; class ssgSelector; class ssgRangeSelector; class ssgVertexArray; @@ -75,7 +76,7 @@ private: string model_path; string texture_path; FGTileEntry *tile; - ssgTransform *obj_trans; + ssgSharedPtr obj_trans; SGBucket bucket; @@ -128,27 +129,27 @@ private: // - kidn(fan) // pointer to ssg transform for this tile - ssgPlacementTransform *terra_transform; - ssgPlacementTransform *vasi_lights_transform; - ssgPlacementTransform *rwy_lights_transform; - ssgPlacementTransform *taxi_lights_transform; - ssgPlacementTransform *gnd_lights_transform; + ssgSharedPtr terra_transform; + ssgSharedPtr vasi_lights_transform; + ssgSharedPtr rwy_lights_transform; + ssgSharedPtr taxi_lights_transform; + ssgSharedPtr gnd_lights_transform; // pointer to ssg range selector for this tile - ssgRangeSelector *terra_range; - ssgRangeSelector *gnd_lights_range; + ssgSharedPtr terra_range; + ssgSharedPtr gnd_lights_range; // we create several preset brightness and can choose which one we // want based on lighting conditions. - ssgSelector *gnd_lights_brightness; + ssgSharedPtr gnd_lights_brightness; // we need to be able to turn runway lights on or off (doing this // via a call back would be nifty, but then the call back needs to // know about the higher level application's global state which is // a problem if we move the code into simgear.) - ssgSelector *vasi_lights_selector; - ssgSelector *rwy_lights_selector; - ssgSelector *taxi_lights_selector; + ssgSharedPtr vasi_lights_selector; + ssgSharedPtr rwy_lights_selector; + ssgSharedPtr taxi_lights_selector; /** * Indicates this tile has been loaded from a file and connected