Fix shared string memory leak.

This commit is contained in:
Skyth 2024-12-16 11:24:12 +03:00
parent 6c57221807
commit 74e6df96d4

View file

@ -61,7 +61,7 @@ namespace Hedgehog::Base
decrementedValue = ByteSwap(ByteSwap(originalValue) - 1);
} while (InterlockedCompareExchange(reinterpret_cast<LONG*>(&RefCountAndLength), decrementedValue, originalValue) != originalValue);
if (RefCountAndLength == 0)
if ((decrementedValue & 0xFFFF0000) == 0)
__HH_FREE(this);
}