targets: win32: targetPAL_Events: Fix memory leak
unique_ptr::release call does not destroy the managed object, so we
need to handle this to not generate a leak.
@@ -31,7 +31,7 @@ void Events_SetBoolTimer(bool *timerCompleteFlag, uint32_t millisecondsFromNow)
// we assume only 1 can be active, abort previous just in case
if (boolEventsTimer != NULL)
{
- boolEventsTimer.release();
+ delete boolEventsTimer.release();
}
if (timerCompleteFlag)
