Fix #676 - memory leak of IReadFile, by nathanm32292394
Reference to a, through IrrLicht, opened file wasn't getting closed. Use IReadFile::drop() (derived from IReferenceCounted::drop()) to fix this severe memory leak. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11397 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -667,7 +667,8 @@ scene::IAnimatedMesh *IrrDriver::getAnimatedMesh(const std::string &filename)
|
||||
file_system->getFileArchive(file_system->getFileArchiveCount()-1);
|
||||
io::IReadFile* content = zip_archive->createAndOpenFile(0);
|
||||
m = m_scene_manager->getMesh(content);
|
||||
|
||||
content->drop();
|
||||
|
||||
file_system->removeFileArchive(file_system->getFileArchiveCount()-1);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user