mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user