[Object] Remove object name from name_table on object removal

This commit is contained in:
Gliniak 2021-06-13 14:59:51 +02:00 committed by Rick Gibbed
parent 052ce3d389
commit 4cc2dad005
1 changed files with 4 additions and 0 deletions

View File

@ -205,6 +205,10 @@ X_STATUS ObjectTable::RemoveHandle(X_HANDLE handle) {
XELOGI("Removed handle:{:08X} for {}", handle, typeid(*object).name());
// Remove object name from mapping to prevent naming collision.
if (!object->name().empty()) {
RemoveNameMapping(object->name());
}
// Release now that the object has been removed from the table.
object->Release();
}