diff options
| author | donkopunchstania <donkopunchstania@gmail.com> | 2010-02-17 07:15:39 +0000 |
|---|---|---|
| committer | donkopunchstania <donkopunchstania@gmail.com> | 2010-02-17 07:15:39 +0000 |
| commit | c3697df665b2c4357e1efd628c146d36ceb2b390 (patch) | |
| tree | 87cbfec9b028ee4a8db8964d811b9a3d3865a632 /Source/Core/DiscIO/Src/FileMonitor.cpp | |
| parent | b88f5109841b4db4c754c6cea14ba6b7174954de (diff) | |
More memory leak fixing.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5072 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/FileMonitor.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Src/FileMonitor.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/Src/FileMonitor.cpp b/Source/Core/DiscIO/Src/FileMonitor.cpp index 854ba8a08d..06f4a7b789 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.cpp +++ b/Source/Core/DiscIO/Src/FileMonitor.cpp @@ -145,5 +145,27 @@ void FindFilename(u64 offset) CheckFile(fname, pFileSystem->GetFileSize(fname));
}
+void Close()
+{
+ 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();
+
+ ISOFile = "";
+ CurrentFile = "";
+ FileAccess = true;
+}
+
} // FileMon
|
