From Cedric Pinson, "Here a fix about a leak in InputStream::decompress

I changed
       _in->setStream( new std::stringstream(data) );
to
       _dataDecompress = new std::stringstream(data);
       _in->setStream( _dataDecompress );

Then when the destructor is of InputStream is called I delete the
dataDecompress stringstream.
"
This commit is contained in:
Robert Osfield
2010-06-15 10:02:34 +00:00
parent d9bd6c977e
commit 0c84f2deff
2 changed files with 9 additions and 3 deletions

View File

@@ -167,6 +167,9 @@ protected:
osg::ref_ptr<InputIterator> _in;
osg::ref_ptr<InputException> _exception;
osg::ref_ptr<const osgDB::Options> _options;
// store here to avoid a new and a leak in InputStream::decompress
std::stringstream* _dataDecompress;
};
void InputStream::throwException( const std::string& msg )