1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix memory leaks in GenericCAO, ShaderSource and Player classes

This commit is contained in:
sapier 2014-07-02 23:33:18 +02:00
parent 3d6d66b181
commit b8343cd11c
3 changed files with 8 additions and 3 deletions

View file

@ -383,13 +383,16 @@ ShaderSource::ShaderSource(IrrlichtDevice *device):
ShaderSource::~ShaderSource()
{
//m_shader_callback->drop();
for (std::vector<IShaderConstantSetter*>::iterator iter = m_global_setters.begin();
iter != m_global_setters.end(); iter++) {
delete *iter;
}
m_global_setters.clear();
if (m_shader_callback) {
m_shader_callback->drop();
m_shader_callback = NULL;
}
}
u32 ShaderSource::getShader(const std::string &name,