cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
5.49k stars 1.58k forks source link

fix logic error when removing an array element in loop #17215

Closed minggo closed 4 days ago

minggo commented 5 days ago

The issue is caused by this PR: https://github.com/cocos/cocos-engine/pull/16674.

github-actions[bot] commented 5 days ago

Interface Check Report

This pull request does not change any public interfaces !

hweiwei commented 4 days ago

image 应该修改的是这里的for循环,修改那边不能解决问题的

minggo commented 4 days ago

间接影响的。否则这里的 for 循环不知道对象是否被移除了。当然了,如果王 Timer 再加个标记位也可以,这个也可以后续考虑。因为 Timer 的变量已经很多了。