From: <bal...@us...> - 2003-10-24 15:49:06
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv31687/Core Modified Files: Window.cpp Log Message: Bug Fixed: Not freeing the BackGround.... 1,5Mb per window not freed :-) Index: Window.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Window.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Window.cpp 22 Oct 2003 13:43:10 -0000 1.7 --- Window.cpp 23 Oct 2003 22:42:11 -0000 1.8 *************** *** 40,47 **** std::vector<Control*>::iterator m = Controls.begin(); for(int i = 0; Controls.size() != 0;) { ! delete(*m); Controls.erase(m); m = Controls.begin(); } } /** Add a Control in the Window */ --- 40,51 ---- std::vector<Control*>::iterator m = Controls.begin(); for(int i = 0; Controls.size() != 0;) { ! Control * ctrl = (*m); ! delete(ctrl); Controls.erase(m); m = Controls.begin(); } + if(BackGround) + core->GetVideoDriver()->FreeSprite(BackGround); + BackGround = NULL; } /** Add a Control in the Window */ |