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:
parent
3d6d66b181
commit
b8343cd11c
3 changed files with 8 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue