diff --git a/Source/Graphics/Component/ScrollingList.cpp b/Source/Graphics/Component/ScrollingList.cpp index 06f2a37..a76061f 100644 --- a/Source/Graphics/Component/ScrollingList.cpp +++ b/Source/Graphics/Component/ScrollingList.cpp @@ -59,6 +59,33 @@ ScrollingList::ScrollingList(Configuration &c, ScrollingList::~ScrollingList() { + if(SpriteList) + { + std::vector::iterator it = SpriteList->begin(); + + while(it != SpriteList->end()) + { + if(*it != NULL) + { + Logger::Write(Logger::ZONE_DEBUG, "ScrollingList", "Free"); + + DeallocateTexture(*it); + if((*it)->GetCollectionItem()) + { + delete (*it)->GetCollectionItem(); + } + + delete *it; + } + + SpriteList->erase(it); + + it = SpriteList->begin(); + } + + delete SpriteList; + SpriteList = NULL; + } } void ScrollingList::SetItems(std::vector *spriteList) diff --git a/Source/RetroFE.cpp b/Source/RetroFE.cpp index 92807df..6374cc4 100644 --- a/Source/RetroFE.cpp +++ b/Source/RetroFE.cpp @@ -157,7 +157,6 @@ void RetroFE::Run() bool running = true; Item *nextPageItem = NULL; bool adminMode = false; - bool selectActive = false; RETROFE_STATE state = RETROFE_IDLE; Config.GetProperty("attractModeTime", attractModeTime);