From 51fb0a6f9647ba199da10fe4f018ee36e44e65ba Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 27 Feb 2021 11:56:04 -0800 Subject: 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. --- src/core/hle/kernel/svc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hle/kernel/svc.cpp') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index cc8fa6576..d04116115 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -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(); -- cgit v1.2.3