Retain objects when restored into the object table.
This commit is contained in:
parent
c8a2298b9d
commit
a4865bd24a
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue