early-access version 3195

This commit is contained in:
pineappleEA
2022-12-07 04:34:54 +01:00
parent c4ef15907c
commit 695c47515c
6 changed files with 28 additions and 22 deletions

View File

@@ -104,12 +104,16 @@ struct KernelCore::Impl {
}
void CloseCurrentProcess() {
(*current_process).Finalize();
// current_process->Close();
// TODO: The current process should be destroyed based on accurate ref counting after
KProcess* old_process = current_process.exchange(nullptr);
if (old_process == nullptr) {
return;
}
// old_process->Close();
// TODO: The process should be destroyed based on accurate ref counting after
// calling Close(). Adding a manual Destroy() call instead to avoid a memory leak.
(*current_process).Destroy();
current_process = nullptr;
old_process->Finalize();
old_process->Destroy();
}
void Shutdown() {