From 0b6db4979db1f10b2fae8f96485cb32d3cc34cca Mon Sep 17 00:00:00 2001 From: Adrian Niculescu <15037449+adrian-niculescu@users.noreply.github.com> Date: Tue, 2 Dec 2025 19:01:10 +0200 Subject: [PATCH] Clarified timer cleanup comment in removeTask --- NativeScript/runtime/Timers.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/NativeScript/runtime/Timers.cpp b/NativeScript/runtime/Timers.cpp index 90599266..760af831 100644 --- a/NativeScript/runtime/Timers.cpp +++ b/NativeScript/runtime/Timers.cpp @@ -65,11 +65,8 @@ class TimerState { it->second->Unschedule(); timerMap_.erase(it); CFRunLoopTimerInvalidate(timer); - // timer and context will be released by the retain function - // CFRunLoopTimerContext context; - // CFRunLoopTimerGetContext(timer, &context); - // delete static_cast*>(context.info); - // CFRelease(timer); + // CFRunLoopTimerInvalidate triggers our TimerRelease callback, which + // deletes TimerContext, whose destructor calls CFRelease(task->timer) } }