Joker-YF / JKFrame

Indie Game Framework
MIT License
249 stars 39 forks source link

UISystem修改: #4

Closed GodChouyu closed 1 year ago

GodChouyu commented 1 year ago

1.为enumerator增加using,使其线程安全 2.修改了TryGetValue后使用out参数没有判空导致可能出现的System.NullReferenceException异常

Joker-YF commented 1 year ago

你好感谢提交 这里的线程安全没有实际意义的,因为不具备多线程使用的条件,其他的采纳~

GodChouyu commented 1 year ago

您好。我这边经常使用异步方法处理业务逻辑(await-async),虽然现在没有遇到,但是担心可能有线程安全问题。 还有请教一下您经常使用enumerator代替更方便的foreach循环,除了效率会高一点外还有什么考虑么。

------------------ 原始邮件 ------------------ 发件人: "Joker-YF/JKFrame" @.>; 发送时间: 2023年8月1日(星期二) 晚上10:47 @.>; @.**@.>; 主题: Re: [Joker-YF/JKFrame] UISystem修改: (PR #4)

你好感谢提交 这里的线程安全没有实际意义的,因为不具备多线程使用的条件,其他的采纳~

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Joker-YF commented 1 year ago

只是因为早期版本有GC问题,现在可以都替换成foreach