Fix incorrect double-retaining of objects on restore.

This commit is contained in:
Dr. Chat 2015-12-05 18:20:33 -06:00 committed by Ben Vanik
parent 3678a22c90
commit 290d5d9594
2 changed files with 1 additions and 2 deletions

View File

@ -116,7 +116,6 @@ object_ref<XEvent> XEvent::Restore(KernelState* kernel_state,
evt->event_->Set();
}
evt->Retain();
return object_ref<XEvent>(evt);
}

View File

@ -1144,7 +1144,7 @@ object_ref<XThread> XThread::Restore(KernelState* kernel_state,
thread->emulator()->debugger()->OnThreadCreated(thread);
}
return retain_object(thread);
return object_ref<XThread>(thread);
}
XHostThread::XHostThread(KernelState* kernel_state, uint32_t stack_size,