mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 17:50:05 +00:00
Kernel: Added freeing of kernel objects on emulator shutdown.
This commit is contained in:
parent
83a4ad2885
commit
f49ac3a2d7
@ -132,12 +132,16 @@ Object* ObjectPool::CreateByIDType(int type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Initialize the kernel
|
||||||
void Init() {
|
void Init() {
|
||||||
Kernel::ThreadingInit();
|
Kernel::ThreadingInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Shutdown the kernel
|
||||||
void Shutdown() {
|
void Shutdown() {
|
||||||
Kernel::ThreadingShutdown();
|
Kernel::ThreadingShutdown();
|
||||||
|
|
||||||
|
g_object_pool.Clear(); // Free all kernel objects
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,6 +167,12 @@ private:
|
|||||||
extern ObjectPool g_object_pool;
|
extern ObjectPool g_object_pool;
|
||||||
extern Handle g_main_thread;
|
extern Handle g_main_thread;
|
||||||
|
|
||||||
|
/// Initialize the kernel
|
||||||
|
void Init();
|
||||||
|
|
||||||
|
/// Shutdown the kernel
|
||||||
|
void Shutdown();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads executable stored at specified address
|
* Loads executable stored at specified address
|
||||||
* @entry_point Entry point in memory of loaded executable
|
* @entry_point Entry point in memory of loaded executable
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
#include "core/hw/hw.h"
|
#include "core/hw/hw.h"
|
||||||
#include "core/hle/hle.h"
|
#include "core/hle/hle.h"
|
||||||
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
|
||||||
#include "video_core/video_core.h"
|
#include "video_core/video_core.h"
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ void Init(EmuWindow* emu_window) {
|
|||||||
HLE::Init();
|
HLE::Init();
|
||||||
CoreTiming::Init();
|
CoreTiming::Init();
|
||||||
VideoCore::Init(emu_window);
|
VideoCore::Init(emu_window);
|
||||||
|
Kernel::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunLoopFor(int cycles) {
|
void RunLoopFor(int cycles) {
|
||||||
@ -42,6 +44,7 @@ void Shutdown() {
|
|||||||
HLE::Shutdown();
|
HLE::Shutdown();
|
||||||
CoreTiming::Shutdown();
|
CoreTiming::Shutdown();
|
||||||
VideoCore::Shutdown();
|
VideoCore::Shutdown();
|
||||||
|
Kernel::Shutdown();
|
||||||
g_ctr_file_system.Shutdown();
|
g_ctr_file_system.Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user