mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Implemented proper memory cleanup when deleting FileData objects.
This fixes a memory leak which was most prominent during application shutdown.
This commit is contained in:
parent
35c7c7ec09
commit
da37e2c11a
|
@ -68,13 +68,14 @@ FileData::FileData(
|
|||
|
||||
FileData::~FileData()
|
||||
{
|
||||
if (mParent)
|
||||
mParent->removeChild(this);
|
||||
|
||||
if (mType == GAME)
|
||||
mSystem->getIndex()->removeFromIndex(this);
|
||||
|
||||
mChildren.clear();
|
||||
if (mParent)
|
||||
mParent->removeChild(this);
|
||||
|
||||
while (mChildren.size() > 0)
|
||||
delete (mChildren.front());
|
||||
}
|
||||
|
||||
std::string FileData::getDisplayName() const
|
||||
|
|
Loading…
Reference in a new issue