Fixed minor memory leak.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5651 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b84043f819
commit
2bb985313d
@ -41,6 +41,18 @@ MaterialManager::MaterialManager()
|
||||
// be moved into a separate function.
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Frees all allocated data structures.
|
||||
*/
|
||||
MaterialManager::~MaterialManager()
|
||||
{
|
||||
for(unsigned int i=0; i<m_materials.size(); i++)
|
||||
{
|
||||
delete m_materials[i];
|
||||
}
|
||||
m_materials.clear();
|
||||
} // ~MaterialManager
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void MaterialManager::setAllFlatMaterialFlags(scene::IMeshBuffer *mb) const
|
||||
|
@ -41,7 +41,8 @@ private:
|
||||
|
||||
std::vector<Material*> m_materials;
|
||||
public:
|
||||
MaterialManager();
|
||||
MaterialManager();
|
||||
~MaterialManager();
|
||||
void loadMaterial ();
|
||||
void reInit ();
|
||||
void setAllMaterialFlags(video::ITexture* t,
|
||||
|
Loading…
Reference in New Issue
Block a user