views:

60

answers:

1

So, my app is a set of stacked views, with a RootViewController as the 2nd view on the stack. The bottom-most view is a menu page, which loads either the rootview controller or an info view onto the stack, and from the rootview controller theres several more views.

When I receive a low memory warning, my app does fine unless I try to pop to the menu page from the rootviewcontroller or the info page. If I want to go from anywhere else within the rootviewcontroller to another view, it is fine until I try to unload the rootviewcontroller by popping it off the stack. Without a memory warning, the rootview will pop to the menu just fine. But if I simulate a lowmemory warning and try to pop the view, then it crashes. Once again, only a crash on both a lowmemory warning and popping a controller to get to the menu page. I have no clue whats going on, I cant find any memory leaks, nothing being over-released.

This is my first app so maybe I'm missing something obvious.

A: 

So I commented out the [super didReceiveMemoryWarning] on the Menu page, and it is working! I guess it was unloading the view each time. Everythings working fine. There was nothing to release on that page anyways so it shouldnt be an issue. Putting this answer here for other ppl who may have the same problem later on

ElChico
"There was nothing to release on that page anyways so it shouldnt be an issue." Well, it shouldn't be a fix either. The most probable source of crash would still be releasing something twice. Do you have any clues using gdb (backtrace, exception, etc...)?
jv42
The menu page only had a button to go to a View controller. In a deeper stack, there is an image intensive view that would sometimes slow down and lock up, and I'd assume low memory errors were called then, and all other views that received the memory warning would unload their view. Therefore when I tried to pop back up to a higher view that no longer existed, the app would crash. I took out the receivedmemorwarning so that it no longer acts on low memory to release the view.
ElChico