You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): prevent timer/ticker leaks; use unsafe.Add for pointer arithmetic (#9486)
This PR improves runtime safety and resource handling:
- Timer: replaced time.After(...) with time.NewTimer(...) and ensured
timer.Stop() is always called to avoid hidden leaks in loops.
- Ticker: added ticker.Stop() and refactored time.Tick(...) usage to use
time.NewTicker for proper lifecycle management.
- Unsafe pointer: switched from unsafe.Pointer + uintptr(offset) to
unsafe.Add(...) for clearer and more consistent pointer arithmetic.
These changes make timer/ticker usage safer in long-running goroutines
and align pointer operations with modern Go practices.
0 commit comments