From: Laszlo T. <ave...@us...> - 2005-03-19 15:45:08
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17582 Modified Files: Interface.cpp Log Message: Interface:freeing up WindowFrames, cleaning Cache on quit Index: Interface.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Interface.cpp,v retrieving revision 1.282 retrieving revision 1.283 diff -C2 -d -r1.282 -r1.283 *** Interface.cpp 18 Mar 2005 18:10:18 -0000 1.282 --- Interface.cpp 19 Mar 2005 15:44:53 -0000 1.283 *************** *** 184,194 **** Interface::~Interface(void) { CharAnimations::ReleaseMemory(); - ItemCache.RemoveAll(ReleaseItem); - SpellCache.RemoveAll(ReleaseSpell); - if (CurrentStore) { delete CurrentStore; } unsigned int i; --- 184,201 ---- Interface::~Interface(void) { + //destroy the highest objects in the hierarchy first! + if (game) { + delete( game ); + } + if (worldmap) { + delete( worldmap ); + } CharAnimations::ReleaseMemory(); if (CurrentStore) { delete CurrentStore; } + ItemCache.RemoveAll(ReleaseItem); + SpellCache.RemoveAll(ReleaseSpell); + unsigned int i; *************** *** 197,200 **** --- 204,210 ---- video->FreeSprite(FogSprites[i]); } + for(i=0;i<4;i++) { + video->FreeSprite(WindowFrames[i]); + } if (TooltipBack) { *************** *** 211,219 **** free( slotmatrix ); } - if (game) { - delete( game ); - } - if (worldmap) - delete( worldmap ); if (music) { FreeInterface( music ); --- 221,224 ---- *************** *** 298,303 **** } delete( plugin ); ! //TODO: Clean the Cache and leave only .bif files ! // FIXME: delete WindowFrames } --- 303,308 ---- } delete( plugin ); ! // Removing all stuff from Cache, except bifs ! DelTree((const char *) CachePath, true); } |