From 0493c7ecdba517a14966be0bc6f233bd930cc648 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 20 Dec 2022 13:19:53 +0200 Subject: [PATCH] Delete private data of Process on destruction --- source/core/unix/process.cpp | 4 +++- source/core/windows/process.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/core/unix/process.cpp b/source/core/unix/process.cpp index 975fa22..ee0a36d 100644 --- a/source/core/unix/process.cpp +++ b/source/core/unix/process.cpp @@ -13,7 +13,9 @@ using namespace std; namespace Msp { Process::~Process() -{ } +{ + delete priv; +} void Process::platform_get_self_info(Private &priv) { diff --git a/source/core/windows/process.cpp b/source/core/windows/process.cpp index aa0fad9..e19fd6b 100644 --- a/source/core/windows/process.cpp +++ b/source/core/windows/process.cpp @@ -44,6 +44,7 @@ Process::~Process() { CloseHandle(priv->info.hProcess); CloseHandle(priv->info.hThread); + delete priv; } void Process::platform_get_self_info(Private &priv) -- 2.45.2