summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-04-12 23:01:40 +0200
committerGitHub <noreply@github.com>2022-04-12 23:01:40 +0200
commitca2accfb259b948431ec174ead432778f3c86f67 (patch)
treef3729b67e09270683a948f48169185c2360cc4af /src/core/hle/service
parentMerge pull request #8178 from tech-ticks/skyline-icache-fix (diff)
parenthle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession. (diff)
downloadyuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar.gz
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar.bz2
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar.lz
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar.xz
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.tar.zst
yuzu-ca2accfb259b948431ec174ead432778f3c86f67.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/sm/sm.cpp8
-rw-r--r--src/core/hle/service/sm/sm.h2
2 files changed, 2 insertions, 8 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index 97f895852..13f5e08ec 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -153,7 +153,7 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext&
auto& port = port_result.Unwrap();
SCOPE_EXIT({ port->GetClientPort().Close(); });
- server_ports.emplace_back(&port->GetServerPort());
+ kernel.RegisterServerObject(&port->GetServerPort());
// Create a new session.
Kernel::KClientSession* session{};
@@ -224,10 +224,6 @@ SM::SM(ServiceManager& service_manager_, Core::System& system_)
});
}
-SM::~SM() {
- for (auto& server_port : server_ports) {
- server_port->Close();
- }
-}
+SM::~SM() = default;
} // namespace Service::SM
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h
index 021eb51b4..f3ff7b27e 100644
--- a/src/core/hle/service/sm/sm.h
+++ b/src/core/hle/service/sm/sm.h
@@ -22,7 +22,6 @@ class KClientPort;
class KClientSession;
class KernelCore;
class KPort;
-class KServerPort;
class SessionRequestHandler;
} // namespace Kernel
@@ -48,7 +47,6 @@ private:
ServiceManager& service_manager;
bool is_initialized{};
Kernel::KernelCore& kernel;
- std::vector<Kernel::KServerPort*> server_ports;
};
class ServiceManager {