diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 7a94bb3f7..97637b277 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -497,6 +498,11 @@ void FGTileMgr::update_queues(bool& isDownloadingScenery) tile_cache.clear_entry(drop_index); + if (_use_vpb) { + // Clear out any VPB data - e.g. roads + simgear::VPBTechnique::unloadFeatures(old->get_tile_bucket()); + } + osg::ref_ptr subgraph = old->getNode(); old->removeFromSceneGraph(); delete old;