diff options
author | sapier <Sapier at GMX dot net> | 2013-04-07 21:42:54 +0200 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-04-07 22:30:29 -0400 |
commit | 2bdff11d5472e4e5299c4e4e25e128b0869367a8 (patch) | |
tree | 7ba0c8d8cf9471691a7e7c97f91ad64e506b420c /src/shader.cpp | |
parent | 7a32698312bcca7dc4e82de80df659418a2b5b3b (diff) | |
download | minetest-2bdff11d5472e4e5299c4e4e25e128b0869367a8.tar.gz minetest-2bdff11d5472e4e5299c4e4e25e128b0869367a8.tar.bz2 minetest-2bdff11d5472e4e5299c4e4e25e128b0869367a8.zip |
fix memory leak on shader shutdown
Diffstat (limited to 'src/shader.cpp')
-rw-r--r-- | src/shader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader.cpp b/src/shader.cpp index a224c82bb..62b7c99a9 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -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) |