Smash some memory leaks

This commit is contained in:
Henrik Rydgard committed 2013-01-13 16:46:45 +01:00
1 parent 338a73472b
commit 8277d901e2
3 files changed
+33 -20

No files matched your search

+6 -2
View File
@@ -42,6 +42,7 @@
MetaFileSystem pspFileSystem;
ParamSFOData g_paramSFO;
static CoreParameter coreParameter;
static PSPMixer *mixer;
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string)
{
@@ -54,7 +55,8 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string)
if (coreParameter.enableSound)
{
host->InitSound(new PSPMixer());
mixer = new PSPMixer();
host->InitSound(mixer);
}
// Init all the HLE modules
@@ -100,10 +102,12 @@ void PSP_Shutdown()
if (coreParameter.enableSound)
{
host->ShutdownSound();
delete mixer;
mixer = 0;
}
__KernelShutdown();
HLEShutdown();
Memory::Shutdown() ;
Memory::Shutdown();
currentCPU = 0;
}