[*] Let IOHandle own the sharing state (auto-call SharingStop on dtor) instead of leaking IPC sharable on copy
This commit is contained in:
parent
e199172428
commit
78e0c2d442
@ -21,6 +21,11 @@ namespace Aurora::IO
|
|||||||
{
|
{
|
||||||
AFileHandle::~AFileHandle()
|
AFileHandle::~AFileHandle()
|
||||||
{
|
{
|
||||||
|
if (this->SharingIsShared())
|
||||||
|
{
|
||||||
|
this->SharingStop();
|
||||||
|
}
|
||||||
|
|
||||||
if (this->uOSWriteHandle.has_value() && this->uOSReadHandle.has_value() &&
|
if (this->uOSWriteHandle.has_value() && this->uOSReadHandle.has_value() &&
|
||||||
this->uOSReadHandle.value() == this->uOSWriteHandle.value())
|
this->uOSReadHandle.value() == this->uOSWriteHandle.value())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user