diff options
| author | bunnei <bunneidev@gmail.com> | 2021-01-16 00:25:29 -0800 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2021-01-28 21:42:26 -0800 |
| commit | ff186b2498e5f3119e0d03a859754722e1948c62 (patch) | |
| tree | 3bfe09f91736044f8187af6df737f61012e55801 /src/core/hle/kernel/handle_table.cpp | |
| parent | 33b493028029c81385d8b8a4864b62da2ed523d5 (diff) | |
core: hle: kernel: object: Implement Finalize() virtual method.
Diffstat (limited to 'src/core/hle/kernel/handle_table.cpp')
| -rw-r--r-- | src/core/hle/kernel/handle_table.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index 10a4e0510..1a2fa9cd8 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp @@ -89,6 +89,10 @@ ResultCode HandleTable::Close(Handle handle) { const u16 slot = GetSlot(handle); + if (objects[slot].use_count() == 1) { + objects[slot]->Finalize(); + } + objects[slot] = nullptr; generations[slot] = next_free_slot; |
