From Ryan Kawicki, added removal of TXPArchive from ReaderWriterTXP when the TXPNode destructs to fix memory consumption issue relating to leaving unused archives in memory.

This commit is contained in:
Robert Osfield
2010-02-02 11:16:10 +00:00
parent 2d91b15489
commit 3a2cd32ea5
3 changed files with 27 additions and 1 deletions

View File

@@ -624,6 +624,12 @@ TXPArchive *ReaderWriterTXP::getArchive(int id, const std::string& dir)
return archive;
}
bool ReaderWriterTXP::removeArchive( int id )
{
osg::notify(osg::INFO)<<"ReaderWriterTXP::removeArchive(id="<<id<<")"<<std::endl;
return (_archives.erase(id) >= 1);
}
class SeamFinder: public osg::NodeVisitor
{
public: