diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-30 23:57:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-31 01:04:53 +0300 |
commit | 91a51ec64c35713914b22f2d9a283dc5b4091c12 (patch) | |
tree | 0289142a45284514a8981b02601c83ac1039dd5d /src/graphicsvertexes.cpp | |
parent | d629f56517f55d1fd756c4774d9a368d66f615df (diff) | |
download | plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.gz plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.bz2 plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.tar.xz plus-91a51ec64c35713914b22f2d9a283dc5b4091c12.zip |
Fix memory leaks and some other errors.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-rw-r--r-- | src/graphicsvertexes.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp index 6beb41a88..7242269f2 100644 --- a/src/graphicsvertexes.cpp +++ b/src/graphicsvertexes.cpp @@ -54,12 +54,27 @@ OpenGLGraphicsVertexes::~OpenGLGraphicsVertexes() void OpenGLGraphicsVertexes::clear() { - delete_all(mFloatTexPool); + for(std::vector<GLfloat*>::iterator it = mFloatTexPool.begin(); + it != mFloatTexPool.end(); ++ it) + { + delete [] (*it); + } mFloatTexPool.clear(); - delete_all(mIntVertPool); + + for(std::vector<GLint*>::iterator it = mIntVertPool.begin(); + it != mIntVertPool.end(); ++ it) + { + delete [] (*it); + } mIntVertPool.clear(); - delete_all(mIntTexPool); + + for(std::vector<GLint*>::iterator it = mIntTexPool.begin(); + it != mIntTexPool.end(); ++ it) + { + delete [] (*it); + } mIntTexPool.clear(); + mVp.clear(); } |