i've heard of some graphics intensive games needing to be rebooted prior to running else crashes would occur.
My app (like many) uses a heavy dose of tableviews to perform most of it's functions. Lately my apps been causing memory warning after navigating through a series of screens. i could replicate the hit on memory by accessing nine table levels in a row. over and over i could cause my 3g to issue a memory warning. each time, exit the app, restart the app and replicate the problem (not in debug mode or instruments.. just on it's own).
if i reboot my 3g, run the app, do the same thing.. no problem.. no warnings. Can anyone shed light on why this happens? I'm sure i have leaks hanging around that i need to fix but why would a reboot fix the problem? Would you think it possible that xcode leaves debugger stubs on the device that might cause some of these issues?
anyone else experiencing this? Thoughts?
Thanks,
John
__________________
---------------------------------------------------------------------- I love being a dad, flying airplanes and writing code.
----------------------------------------------------------------------
Follow me on Twitter: @BostonMerlin
Feed your brain on Twitter: @iPhoneDev101
----------------------------------------------------------------------
iPhone Apps:
The crux of my question was related to why would reseting the device cause those memory warnings of mine to go away.
I was under the assumption that the device was designed to place apps in their own sandbox so as not to bring down the phone when a single app runs amuck.
Rebooting causes my memory warnings to go away when the only thing i'm doing with this device is testing a single app.
Thanks
John
__________________
---------------------------------------------------------------------- I love being a dad, flying airplanes and writing code.
----------------------------------------------------------------------
Follow me on Twitter: @BostonMerlin
Feed your brain on Twitter: @iPhoneDev101
----------------------------------------------------------------------
iPhone Apps:
You're forgetting about Apple's own apps! Mail and Safari DO NOT actually close down and free up memory when you exit to the home screen. That has proven to be the cause of 98% of my memory issues. Try it yourself... do not reboot the phone next time you can replicate the low-memory warning... instead open Safari and force-quit it by *holding* the home button for 6-8 seconds (until Safari finally disappears). Do the same thing for Mail. Now try your app again... you probably (as in I'd place bets!) wont have a memory warning after that.
You need to use the performance tools to see memory usage. You can see how much is used by all the apps running on the device. Also look in the console for messages about memory usage.
My observations are these. When your app gets memory warnings the background apps are also getting them. The OS will kill some of the background apps before it kills your app. Springboard can increase in size also and I think it won't be killed.
The main point is that you need to make your app run in a small footprint and respond well to memory warnings. You obviously have no control over other apps. Some game vendors tell their users to reboot the device before running their app but this seems cheesy to me. If your app is using too much memory simply by pushing and popping view controllers then that's a problem with your app.