@ -144,4 +144,14 @@ Handle CreateArchive(FileSys::Archive* backend, const std::string& name) {
return handle;
}
/// Initialize archives
void ArchiveInit() {
g_archive_map.clear();
/// Shutdown archives
void ArchiveShutdown() {
} // namespace Kernel
@ -29,4 +29,10 @@ Handle OpenArchive(FileSys::Archive::IdCode id_code);
*/
Handle CreateArchive(FileSys::Archive* backend, const std::string& name);
void ArchiveInit();
void ArchiveShutdown();
} // namespace FileSys
@ -9,6 +9,7 @@
#include "core/core.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/thread.h"
#include "core/hle/kernel/archive.h"
namespace Kernel {
@ -133,11 +134,13 @@ Object* ObjectPool::CreateByIDType(int type) {
/// Initialize the kernel
void Init() {
Kernel::ThreadingInit();
Kernel::ArchiveInit();
/// Shutdown the kernel
void Shutdown() {
Kernel::ThreadingShutdown();
Kernel::ArchiveShutdown();
g_object_pool.Clear(); // Free all kernel objects