diff options
| author | 2021-12-19 01:38:25 -0500 | |
|---|---|---|
| committer | 2021-12-19 01:38:25 -0500 | |
| commit | 55650c5b756d81054669974a3098aff3114309c0 (patch) | |
| tree | 1dbed755682f825426ea17270a0af9a15ef12161 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #7593 from german77/brrr_test (diff) | |
| download | yuzu-55650c5b756d81054669974a3098aff3114309c0.tar.gz yuzu-55650c5b756d81054669974a3098aff3114309c0.tar.xz yuzu-55650c5b756d81054669974a3098aff3114309c0.zip | |
kernel: Manually destroy the current process during shut down
Avoids a memory leak.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 2e4e4cb1c..1225e1fba 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -182,7 +182,10 @@ struct KernelCore::Impl { | |||
| 182 | // Shutdown all processes. | 182 | // Shutdown all processes. |
| 183 | if (current_process) { | 183 | if (current_process) { |
| 184 | current_process->Finalize(); | 184 | current_process->Finalize(); |
| 185 | current_process->Close(); | 185 | // current_process->Close(); |
| 186 | // TODO: The current process should be destroyed based on accurate ref counting after | ||
| 187 | // calling Close(). Adding a manual Destroy() call instead to avoid a memory leak. | ||
| 188 | current_process->Destroy(); | ||
| 186 | current_process = nullptr; | 189 | current_process = nullptr; |
| 187 | } | 190 | } |
| 188 | 191 | ||