The kernel object table now keeps track of handle reference counts.

This commit is contained in:
Dr. Chat
2015-07-22 19:34:33 -05:00
parent a42ab648ed
commit 8e41d5a707
6 changed files with 75 additions and 23 deletions

View File

@@ -190,8 +190,7 @@ dword_result_t NtDuplicateObject(dword_t handle, lpdword_t new_handle_ptr,
DECLARE_XBOXKRNL_EXPORT(NtDuplicateObject, ExportTag::kImplemented);
dword_result_t NtClose(dword_t handle) {
// FIXME: This needs to be removed once handle count reaches 0!
return kernel_state()->object_table()->RemoveHandle(handle);
return kernel_state()->object_table()->ReleaseHandle(handle);
}
DECLARE_XBOXKRNL_EXPORT(NtClose, ExportTag::kImplemented);