diff options
author | jianliang79 <jianliang79@gmail.com> | 2009-12-30 12:58:22 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-12-30 13:35:01 (GMT) |
commit | f005fb5b15eb387edb1a0d1da91639ac4cc1e67b (patch) | |
tree | 460ccd6defbe29fc8f8a7c61ac84ca075dea5d8a /src/opengl/gl2paintengineex | |
parent | 5394052c422f7087263ad6dc6d6a4448b4c4afba (diff) | |
download | Qt-f005fb5b15eb387edb1a0d1da91639ac4cc1e67b.zip Qt-f005fb5b15eb387edb1a0d1da91639ac4cc1e67b.tar.gz Qt-f005fb5b15eb387edb1a0d1da91639ac4cc1e67b.tar.bz2 |
fix a memory leak in QGLEngineSharedShaders
Merge-request: 412
Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 7 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index da33eb3..b026e29 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -218,6 +218,13 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) } +QGLEngineSharedShaders::~QGLEngineSharedShaders() +{ + QList<QGLEngineShaderProg*>::iterator itr; + for (itr = cachedPrograms.begin(); itr != cachedPrograms.end(); ++itr) + delete *itr; +} + #if defined (QT_DEBUG) QByteArray QGLEngineSharedShaders::snippetNameStr(SnippetName name) { diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index a132e1b..a3464d4 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -344,6 +344,7 @@ public: */ QGLEngineSharedShaders(const QGLContext *context); + ~QGLEngineSharedShaders(); QGLShaderProgram *simpleProgram() { return simpleShaderProg; } QGLShaderProgram *blitProgram() { return blitShaderProg; } |