added texture cleanup to Scene destructor

git-svn-id: svn://anubis/fart/trunk@385 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2010-10-14 14:19:06 +00:00
parent b4717b7cbc
commit 5b6a64cb5f

View File

@ -75,6 +75,13 @@ Scene::Scene(const map<string, const char *> & options,
Scene::~Scene() Scene::~Scene()
{ {
/* clean up any textures loaded with freeimage */
for (std::map< std::string, FIBITMAP * >::iterator it = m_textures.begin();
it != m_textures.end();
it++)
{
FreeImage_Unload(it->second);
}
} }
void Scene::renderPixel(int x, int y, unsigned char * pixel) void Scene::renderPixel(int x, int y, unsigned char * pixel)