From 78e0c2d442fd145459e54323f6b18667daebef3b Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sun, 25 Feb 2024 19:50:19 +0000 Subject: [PATCH] [*] Let IOHandle own the sharing state (auto-call SharingStop on dtor) instead of leaking IPC sharable on copy --- Source/IO/AuIOHandle.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/IO/AuIOHandle.cpp b/Source/IO/AuIOHandle.cpp index 65eaacef..49e43a35 100644 --- a/Source/IO/AuIOHandle.cpp +++ b/Source/IO/AuIOHandle.cpp @@ -21,6 +21,11 @@ namespace Aurora::IO { AFileHandle::~AFileHandle() { + if (this->SharingIsShared()) + { + this->SharingStop(); + } + if (this->uOSWriteHandle.has_value() && this->uOSReadHandle.has_value() && this->uOSReadHandle.value() == this->uOSWriteHandle.value()) {