Retain objects when restored into the object table.
This commit is contained in:
@@ -401,6 +401,7 @@ X_STATUS ObjectTable::RestoreHandle(X_HANDLE handle, XObject* object) {
|
|||||||
if (table_capacity_ >= slot) {
|
if (table_capacity_ >= slot) {
|
||||||
auto& entry = table_[slot];
|
auto& entry = table_[slot];
|
||||||
entry.object = object;
|
entry.object = object;
|
||||||
|
object->Retain();
|
||||||
}
|
}
|
||||||
|
|
||||||
return X_STATUS_SUCCESS;
|
return X_STATUS_SUCCESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user