Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
I have made an application that relies on a UITabBar to navigate through different functions. I have almost completed it, but I have found out just yesterday that it is too heavy for the system, resulting in the system crashing. More specifically:

  • The application Launches. Usage is 5 MBytes, because a nib for a first view controller is loaded, which I need again once the user proceeds to the next screen.
  • The next screen, is the main screen, which uses the UITabBar. Application remains on 6mBytes of usage
  • When pressing different items in the tab bar, I force it to load different nibs associated with those buttons, so the application at some point uses 14mBytes of data. I have 5 view controllers in all for 5 buttons in the tab bar (of course those view controllers have navigation controllers and other subviews loaded with table views etc.)
  • So, the application quits when I try to use the internal Camera with my application, since the camera alone boosts my application to 22MBytes of usage!

I don't know what to do now. Is there any way to force the system to give back RAM from controllers that aren't being displayed? For example, is there any way I can release controllers that are not associated with the currently selected view of the Tab Bar Controller?

I would appreciate any recommendation on this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.