iPhone App Crashes due to Low Memory but works fine in simulator

后端 未结 2 1207
面向向阳花
面向向阳花 2021-01-26 03:58

Dear all, I have a navigation-based app with about 60 views.

I have run with the following : 1. Build and analyse : bulid is successful with no complains. 2. Instruments

相关标签:
2条回答
  • 2021-01-26 04:22

    Sharing some code about how you push the view controllers will allow others to help you with this.

    You can pop to root view controller more easily by doing:

    [self.navigationController popToRootViewControllerAnimated:YES];
    

    You are actually pushing a new instance of your root view controller in the code that you have shared.

    0 讨论(0)
  • 2021-01-26 04:27

    You will normally not run into memory problems when running under the simulator, so these errors are not automatically encountered on this platform.

    The simulator does however have a feature where you can manually trigger a Low Memory event. If this is actually the cause of the crash on the device, then it might also be possible that you can trigger the same bug in the simulator in this way.

    0 讨论(0)
提交回复
热议问题