]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tilecache.cxx
Allow using the system version of flite and the HTS engine
[flightgear.git] / src / Scenery / tilecache.cxx
index bdec44d3b693a0b3b213104d93bcb2d3e8efc765..d25c3878062430f7787ed23cf79ea2d03600bd98 100644 (file)
@@ -38,8 +38,14 @@ TileCache::TileCache( void ) :
 }
 
 
-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;
+    }
 }
 
 
@@ -154,7 +160,6 @@ void TileCache::clear_cache() {
 
     for ( ; current != end; ++current ) {
         long index = current->first;
-        SG_LOG( SG_TERRAIN, SG_DEBUG, "clearing " << index );
         TileEntry *e = current->second;
         if ( e->is_loaded() ) {
             e->tile_bucket.make_bad();