【问题标题】:NativeScript 5 - iOS Out of memory crash and memory leaksNativeScript 5 - iOS 内存不足崩溃和内存泄漏
【发布时间】:2018-11-23 17:55:38
【问题描述】:

复制到这里:https://github.com/NativeScript/NativeScript/issues/6607

堆栈:

  • tns 5

  • 角度 7

演示库:

https://github.com/reposooo/ns-out-of-memory

基于 ns3 中的类似问题:https://github.com/NativeScript/NativeScript/issues/4490

重现步骤(与 AOT 的结果相同):

tns 运行 ios

should open app

  • 在 Xcode 中打开内存报告
  • 点击示例循环 2-4 次
  • 点击循环 10 倍

Reserved memory hasnt gone

【问题讨论】:

  • 您确认ngOnInit 只被调用过一次吗?在我看来,每次您再次显示该屏幕时都应该调用它,这会创建越来越多的订阅者,每个订阅者都强烈引用 this 而不是使用 WeakRef
  • 它已经在上面的问题中回答了。 - github.com/NativeScript/NativeScript/issues/6607

标签: angular nativescript angular2-nativescript angular7 nativescript-angular


【解决方案1】:

感谢您的报告。我们已在 GitHub 问题中做出回应,问题已得到修复,将与 {N} iOS Runtime 版本 5.0.1 一起发布。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-07
    相关资源
    最近更新 更多