core: Switch to unique_ptr for usage of Common::Fiber.

- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
This commit is contained in:
bunnei 2021-02-27 11:56:04 -08:00
parent 09f7c355c6
commit 51fb0a6f96
10 changed files with 58 additions and 59 deletions

View file

@ -2626,8 +2626,7 @@ void Call(Core::System& system, u32 immediate) {
kernel.ExitSVCProfile();
if (!thread->IsCallingSvc()) {
auto* host_context = thread->GetHostContext().get();
host_context->Rewind();
thread->GetHostContext()->Rewind();
}
system.EnterDynarmicProfile();