From 91a51ec64c35713914b22f2d9a283dc5b4091c12 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Mar 2011 23:57:40 +0300 Subject: Fix memory leaks and some other errors. --- src/graphicsvertexes.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/graphicsvertexes.cpp') 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::iterator it = mFloatTexPool.begin(); + it != mFloatTexPool.end(); ++ it) + { + delete [] (*it); + } mFloatTexPool.clear(); - delete_all(mIntVertPool); + + for(std::vector::iterator it = mIntVertPool.begin(); + it != mIntVertPool.end(); ++ it) + { + delete [] (*it); + } mIntVertPool.clear(); - delete_all(mIntTexPool); + + for(std::vector::iterator it = mIntTexPool.begin(); + it != mIntTexPool.end(); ++ it) + { + delete [] (*it); + } mIntTexPool.clear(); + mVp.clear(); } -- cgit v1.2.3-60-g2f50