[*] Let IOHandle own the sharing state (auto-call SharingStop on dtor) instead of leaking IPC sharable on copy

This commit is contained in:
Reece Wilson 2024-02-25 19:50:19 +00:00
parent e199172428
commit 78e0c2d442

View File

@ -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())
{