From: frohlich Date: Sun, 28 Jun 2009 09:19:04 +0000 (+0000) Subject: Remove unneeded explicit scenegraph deletion. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=382e0c6ad2c777778b3a799d774cf39fd268343b;p=simgear.git Remove unneeded explicit scenegraph deletion. Modified Files: simgear/scene/tgdb/TileCache.cxx simgear/scene/tgdb/TileEntry.cxx simgear/scene/tgdb/TileEntry.hxx --- diff --git a/simgear/scene/tgdb/TileCache.cxx b/simgear/scene/tgdb/TileCache.cxx index 106dd054..1d34fd8d 100644 --- a/simgear/scene/tgdb/TileCache.cxx +++ b/simgear/scene/tgdb/TileCache.cxx @@ -52,7 +52,6 @@ void TileCache::entry_free( long cache_index ) { TileEntry *tile = tile_cache[cache_index]; tile->removeFromSceneGraph(); - tile->free_tile(); delete tile; tile_cache.erase( cache_index ); diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index 76cfd0c3..d49925c2 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -145,19 +145,6 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat, } -// Clean up the memory used by this tile and delete the arrays used by -// ssg as well as the whole ssg branch -bool TileEntry::free_tile() { - SG_LOG( SG_TERRAIN, SG_DEBUG, - "FREEING TILE = (" << tile_bucket << ")" ); - - _node->removeChildren(0, _node->getNumChildren()); - _node = 0; - - return true; -} - - // Update the ssg transform node for this tile so it can be // properly drawn relative to our (0,0,0) point void TileEntry::prep_ssg_node(float vis) { diff --git a/simgear/scene/tgdb/TileEntry.hxx b/simgear/scene/tgdb/TileEntry.hxx index 287a9513..5fc69827 100644 --- a/simgear/scene/tgdb/TileEntry.hxx +++ b/simgear/scene/tgdb/TileEntry.hxx @@ -102,14 +102,6 @@ public: static void setModelLoadHelper(ModelLoadHelper *m) { _modelLoader=m; } - // Clean up the memory used by this tile and delete the arrays - // used by ssg as well as the whole ssg branch. This does a - // partial clean up and exits so we can spread the load across - // multiple frames. Returns false if work remaining to be done, - // true if dynamically allocated memory used by this tile is - // completely freed. - bool free_tile(); - // Update the ssg transform node for this tile so it can be // properly drawn relative to our (0,0,0) point void prep_ssg_node(float vis);