Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix memory leak on shader shutdown
- Loading branch information
Showing
with
7 additions
and
0 deletions.
-
+6
−0
src/shader.cpp
-
+1
−0
src/shader.h
|
@@ -388,6 +388,12 @@ 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(); |
|
|
} |
|
|
|
|
|
u32 ShaderSource::getShaderId(const std::string &name) |
|
|
|
@@ -49,6 +49,7 @@ struct ShaderInfo |
|
|
video::E_MATERIAL_TYPE material; |
|
|
|
|
|
ShaderInfo(): name(""), material(video::EMT_SOLID) {} |
|
|
virtual ~ShaderInfo() {} |
|
|
}; |
|
|
|
|
|
/* |
|
|