mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 08:07:45 +00:00
Bunch of tiny memory leaks fixed and cleanup, フウ〜!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5056 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b6aa5d91c0
commit
5b1d21d1a1
10 changed files with 61 additions and 35 deletions
|
@ -38,7 +38,7 @@
|
|||
namespace FileMon
|
||||
{
|
||||
|
||||
DiscIO::IVolume *OpenISO;
|
||||
DiscIO::IVolume *OpenISO = NULL;
|
||||
DiscIO::IFileSystem *pFileSystem = NULL;
|
||||
std::vector<const DiscIO::SFileInfo *> GCFiles;
|
||||
std::string ISOFile = "", CurrentFile = "";
|
||||
|
@ -70,6 +70,18 @@ bool ShowSound(std::string FileName)
|
|||
// Read the GC file system
|
||||
void ReadGC(std::string FileName)
|
||||
{
|
||||
// Should have an actual Shutdown procedure or something
|
||||
if(OpenISO != NULL)
|
||||
{
|
||||
delete OpenISO;
|
||||
OpenISO = NULL;
|
||||
}
|
||||
if(pFileSystem != NULL)
|
||||
{
|
||||
delete pFileSystem;
|
||||
pFileSystem = NULL;
|
||||
}
|
||||
// GCFiles' pointers are no longer valid after pFileSystem is cleared
|
||||
GCFiles.clear();
|
||||
OpenISO = DiscIO::CreateVolumeFromFilename(FileName);
|
||||
if (!OpenISO) return;
|
||||
|
|
|
@ -37,6 +37,7 @@ CFileSystemGCWii::CFileSystemGCWii(const IVolume *_rVolume)
|
|||
|
||||
CFileSystemGCWii::~CFileSystemGCWii()
|
||||
{
|
||||
m_FileInfoVector.clear();
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::IsInitialized() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue