mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	Kernel: Added freeing of kernel objects on emulator shutdown.
This commit is contained in:
		@@ -132,12 +132,16 @@ Object* ObjectPool::CreateByIDType(int type) {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Initialize the kernel
 | 
			
		||||
void Init() {
 | 
			
		||||
    Kernel::ThreadingInit();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Shutdown the kernel
 | 
			
		||||
void Shutdown() {
 | 
			
		||||
    Kernel::ThreadingShutdown();
 | 
			
		||||
 | 
			
		||||
    g_object_pool.Clear(); // Free all kernel objects
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -167,6 +167,12 @@ private:
 | 
			
		||||
extern ObjectPool g_object_pool;
 | 
			
		||||
extern Handle g_main_thread;
 | 
			
		||||
 | 
			
		||||
/// Initialize the kernel
 | 
			
		||||
void Init();
 | 
			
		||||
 | 
			
		||||
/// Shutdown the kernel
 | 
			
		||||
void Shutdown();
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Loads executable stored at specified address
 | 
			
		||||
 * @entry_point Entry point in memory of loaded executable
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user