#include <Navaids/navdb.hxx>
#include <Navaids/navlist.hxx>
#include <Scenery/scenery.hxx>
+#include <Scenery/SceneryPager.hxx>
#include <Scenery/tilemgr.hxx>
#include <Scripting/NasalSys.hxx>
#include <Sound/voice.hxx>
// access the scenery object
globals->set_tile_mgr(NULL);
globals->set_scenery(NULL);
+ FGScenery::getPagerSingleton()->clearRequests();
flightgear::CameraGroup::setDefault(NULL);
// don't cancel the pager until after shutdown, since AIModels (and
{
}
+void SceneryPager::clearRequests()
+{
+ _pagerRequests.clear();
+ _deleteRequests.clear();
+}
+
void SceneryPager::queueRequest(const std::string& fileName, Group* group,
float priority, FrameStamp* frameStamp,
ref_ptr<Referenced>& databaseRequest,
// lock on the delete list.
void queueDeleteRequest(osg::ref_ptr<osg::Object>& objptr);
virtual void signalEndFrame();
+
+ void clearRequests();
protected:
// Queue up file requests until the end of the frame
struct PagerRequest
}
-TileCache::~TileCache( void ) {
- clear_cache();
+TileCache::~TileCache( void )
+{
+ tile_map_iterator it = tile_cache.begin();
+ for (; it != tile_cache.end(); ++it) {
+ TileEntry* tile = it->second;
+ tile->removeFromSceneGraph();
+ delete tile;
+ }
}