Partial fix for objects not being cleaned up when they should. There's more left

This commit is contained in:
Marianne Gagnon 2014-09-27 20:37:20 -04:00
parent 4f6bb4565f
commit fe569797a3
2 changed files with 5 additions and 0 deletions

View File

@ -88,6 +88,7 @@ LODNode* ModelDefinitionLoader::instanciateAsLOD(const XMLNode* node, scene::ISc
a_mesh->grab(); a_mesh->grab();
//cache.push_back(a_mesh); //cache.push_back(a_mesh);
irr_driver->grabAllTextures(a_mesh); irr_driver->grabAllTextures(a_mesh);
m_track->addCachedMesh(a_mesh);
scene::IMeshSceneNode* scene_node = irr_driver->addMesh(a_mesh); scene::IMeshSceneNode* scene_node = irr_driver->addMesh(a_mesh);
m_track->handleAnimatedTextures( scene_node, *group[m].m_xml ); m_track->handleAnimatedTextures( scene_node, *group[m].m_xml );

View File

@ -654,7 +654,11 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void setActualNumberOfLaps(unsigned int laps) void setActualNumberOfLaps(unsigned int laps)
{ m_actual_number_of_laps = laps; } { m_actual_number_of_laps = laps; }
// ------------------------------------------------------------------------
bool operator<(const Track &other) const; bool operator<(const Track &other) const;
// ------------------------------------------------------------------------
/** Adds mesh to cleanup list */
void addCachedMesh(scene::IMesh* mesh) { m_all_cached_meshes.push_back(mesh); }
}; // class Track }; // class Track
#endif #endif