From d4beb6fec5eefa60a2d2f873feabaf84731bd50b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 27 May 2011 01:17:04 +0300 Subject: Fix memory leak in graphicsvertexes in SDL mode. --- src/graphicsvertexes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp index 0cadfedc2..d5b374db9 100644 --- a/src/graphicsvertexes.cpp +++ b/src/graphicsvertexes.cpp @@ -132,6 +132,7 @@ void GraphicsVertexes::init(int x, int y, int w, int h) mH = h; for (int f = 0; f < 10; f ++) { + delete_all(sdl[mPtr].mList); sdl[mPtr].mList.clear(); #ifdef USE_OPENGL ogl[mPtr].init(); @@ -156,6 +157,7 @@ void GraphicsVertexes::pushSDL(SDL_Rect r1, SDL_Rect r2) void GraphicsVertexes::clearSDL() { + delete_all(sdl[mPtr].mList); sdl[mPtr].mList.clear(); } -- cgit v1.2.3-70-g09d2