Selaa lähdekoodia

Merge pull request #7603 from ameerj/here-we-go-again

kernel: Manually destroy the current process during shut down
bunnei 4 vuotta sitten
vanhempi
commit
eb4ea7e5c7
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      src/core/hle/kernel/kernel.cpp

+ 4 - 1
src/core/hle/kernel/kernel.cpp

@@ -182,7 +182,10 @@ struct KernelCore::Impl {
         // Shutdown all processes.
         if (current_process) {
             current_process->Finalize();
-            current_process->Close();
+            // current_process->Close();
+            // TODO: The current 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;
         }