fix some memleaks in NANDContentLoader.cpp and ISOProperties.cpp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3919 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-08-01 17:51:17 +00:00
parent dedb2a5fcc
commit 1493c2ba9c
3 changed files with 11 additions and 2 deletions

View File

@ -199,7 +199,15 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
CISOProperties::~CISOProperties()
{
if (IsVolumeWiiDisc(OpenISO))
WiiDisc.clear();
{
for (std::vector<WiiPartition>::const_iterator PartIter = WiiDisc.begin(); PartIter != WiiDisc.end(); ++PartIter)
{
delete PartIter->FileSystem;
delete PartIter->Partition;
for (std::vector<const DiscIO::SFileInfo *>::const_iterator FileIter = PartIter->Files.begin(); FileIter != PartIter->Files.end(); ++FileIter)
delete *FileIter;
}
}
else
if (!IsVolumeWadFile(OpenISO))
delete pFileSystem;