2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

core: Free AppLoader on shutdown to release file (#2558)

Fixes #2455
This commit is contained in:
Yuri Kunde Schlesner 2017-02-11 03:29:46 -08:00 committed by GitHub
parent 0dd007e9ba
commit da6a40e3d1

View file

@ -67,10 +67,6 @@ System::ResultStatus System::SingleStep() {
} }
System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) { System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) {
if (app_loader) {
app_loader.reset();
}
app_loader = Loader::GetLoader(filepath); app_loader = Loader::GetLoader(filepath);
if (!app_loader) { if (!app_loader) {
@ -123,10 +119,6 @@ void System::Reschedule() {
} }
System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
if (cpu_core) {
cpu_core.reset();
}
Memory::Init(); Memory::Init();
if (Settings::values.use_cpu_jit) { if (Settings::values.use_cpu_jit) {
@ -159,7 +151,8 @@ void System::Shutdown() {
Kernel::Shutdown(); Kernel::Shutdown();
HW::Shutdown(); HW::Shutdown();
CoreTiming::Shutdown(); CoreTiming::Shutdown();
cpu_core.reset(); cpu_core = nullptr;
app_loader = nullptr;
LOG_DEBUG(Core, "Shutdown OK"); LOG_DEBUG(Core, "Shutdown OK");
} }