0

I am getting 1000 records from webservice and showing it using tableview in my application in iphone 3GS.It works fine. But when i open and close 50 other applications , it runs in background mode(Multitasking).When I open My Application again, when i get 100 records from webservice, application gets crashed.

1)does background application occupy RAM Memory?

2)how iphone's built-in application like game center works fine when more than 50 apps in background mode?

3)why apple did not care about it?

3 Answers3

1

i think every thing that is running will require a RAM memory either in background or in foreground . I think you should use paging in your web method to get rid of this problem.

B25Dec
  • 2,301
  • 5
  • 31
  • 54
  • wont iphone sdk solve automatically for the application which has been opened through priority? –  Nov 03 '11 at 05:34
  • a heap size is allocated to each app if it is getting high from that particular limit system will crash the app other wise other app's behavior can be changed. – B25Dec Nov 03 '11 at 05:36
  • what is the solution?we have to close manually other application?apple did not care about it? –  Nov 03 '11 at 05:37
  • but this doesn't solve your problem if your app is taking too much of system memory you cann't cross your limits – B25Dec Nov 03 '11 at 05:40
  • debug it in on console of device then you can get an idea why it's happening if possible then generate crash log and read them on terminal you will get to know where is the problem in your code if it is .!!! – B25Dec Nov 03 '11 at 05:45
  • My Question is how iphone's built-in application like game center works fine when more than 50 apps in background mode? –  Nov 03 '11 at 05:51
0

Yeah... Every application that is alive whether in background or in foreground occupy memory in RAM.

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
  • what is the solution?we have to close manually other application?apple did not care about it? –  Nov 03 '11 at 05:39
  • @Mischa See http://stackoverflow.com/questions/2915247/iphone-os-memory-warnings-what-do-the-different-levels-mean/2915477#2915477 If I understand correctly, background apps are automatically closed when the current app gets an "urgent" memory warning. – Jano Nov 03 '11 at 08:56
  • where that line in the link you have given pls? –  Nov 03 '11 at 11:28
0

Each app whether in foreground or background requires RAM. Instead of closing other apps you write your app without caching data and look for leaks in your application. release views and memory of unused data, as in when the app is starts running in the background the - (void)applicationDidEnterBackground:(UIApplication *)application is called: release the data which you can populate again.

Satyavrat
  • 139
  • 1
  • 10