iOS4 - fast context switching

后端 未结 2 1410
别跟我提以往
别跟我提以往 2021-01-18 08:00

When application enters in background running state, how much dirty memory usages is good to go. In apple video it\'s mentioned that the dirty memory should be reduced as mu

2条回答
  •  迷失自我
    2021-01-18 08:34

    1. When an iOS starts running out of memory it tries to kill the background processes that are using the most memory. So while there's no absolute good number, minimising how much memory you use is a good idea. Leaving it at 30Mb is tantamount to guaranteeing that your app will be killed
    2. Unless you want to change your UI there is no need to use anything other that a UINavigationController to deal with your back button. I think the problem here is that if dealloc is not called on a pop or dismiss, you have a memory leak

    Almost all view controllers have data that is effectively cached and can be regenerated when the app returns to the foreground. Think of the data that you release when you get a memory warning when the app is running. (You are responding to memory warnings, right?) It's that stuff that should be released when you go into the background.

提交回复
热议问题