Zuikyo / ZIKRouter

Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zix_checkMemoryLeak 在线程 com.zuik.router.object_leak_check_queue 中的逻辑导致卡顿/崩溃

JanXu-Dev opened this issue · comments

在 DEBUG 模式下 , zix_checkMemoryLeak 在线程 com.zuik.router.object_leak_check_queue 中触发 - (NSString *)description 方法, 在该方法中, 如果调用了一些 UI 上的行为, 导致卡顿, 如图:
bug1
bug4
bug2
bug3
分别调用 UITableView 和 UIScrollView 的一些必须在 主线程 中操作的属性.
问题:

  1. 是否可以关闭zix_checkMemoryLeak, 影响如何?
  2. 是否可以在不关闭的前提下, 有其他解决方案? 暂时是在这几处加上了主线程调用, 但是因为也是第三方库, 希望尽量不修改到其代码.
commented

You can use ZIKViewRouter.detectMemoryLeakDelay = -1 to disable memory leak checking.

commented

Disable memory leak checking won't affect anything. It's just a little feature to help you check memory leak of view controller.
Thanks for your feedback, I will move checking code to main queue in the next version.

哈哈, 谢谢~ 期待下个版本