I have a completed application that runs great on 2nd Gen iPods, as well as iPhone 3GS and 4. However, when running the app on a 4th Gen iPod, low memory crashes are not uncommon at all.
When I run the app through XCode using the "Activity Monitor" performance tool, I noticed that the application requires roughly 2 to 3 times as much "Real Memory". For example, while the app is consistently between 30-35 MB on the 2nd Gen iPod, on the 4th Gen it fluctuates between 70 to 100 MB (hence the low memory crash).
Has anyone else run into this? Is this drastic increase in memory usage on the 4th Gen to be expected? It's kind of ridiculous to get frequent crashes on the new device that has twice as much memory, when I've never had any problems with memory on the older 2nd Gen.
Can anyone with a 4th gen iPod confirm this?
I apologize that this isn't an answer to your question, but I'm really interested to learn more about what you're doing here. I have built two distinct apps, and they both have performance issues. Lots of crashing on the iPhone 3G, and even some sluggish performance on the 3GS and iPhone 4.
According to Instruments, both apps are using about 35MB of real memory and 314MB of virtual memory.
How did you determine that your crashes were low memory crashes? Is that indicated somewhere?
Is it possible to change the iPhone simulator hardware profile so that you can test on older devices? I know you can switch between iPhone and iPhone 4, but that seems to just be for screen size.
Anyway, maybe we can work on this together to figure out how to diagnose and resolve these performance issues.
Thanks for your response, Mike.
Yes, I can get the Leaks tool to work. I always have to build the app in Xcode first, then run it with the Leaks tool. The iPhone app closes then reopens with the Leaks data collecting. I haven't seen anything other than this leak on my app, though.
My app only has one table. It does have about 1MB worth of images (which doesn't seem heavy to me, but you never know). I also have an SQLite DB that's about 2.4MB.
Overall, I don't feel like I'm doing anything crazy, but I'm still plagued with crashes and slowness on 3G and 3GS. I wish Appcelerator could offer some performance tips.
Were you able to confirm that the crashes were "Low Memory" crashes in the XCode organizer?