views:

218

answers:

2

I have an iPad app that's crashing due to low memory. However, Instruments doesn't show any significant amount of memory allocated using ObjectAlloc - it stays under 1MB for the lifetime of the application. Leaks shows less than 1kB leaked over the course of the run. Memory monitor shows the free memory on the devices drop significantly with use, eventually dropping to the point that it's out of memory. Here's a screenshot from Instruments:

Instruments screenshot

I'm totally stumped. As far as I can tell, this basically says that as far as my app is concerned, I'm never using more than about 750kB, but that the device is still running out of physical memory, which is causing my app to crash/force exit.

I'm new to debugging memory issues with XCode. Am I measuring this wrong? Is there another way to see where this memory is going?

+1  A: 

If you look at the Leaks row, you've got a whole lotta memory leaks all happening in a row. Check to make sure that you are releasing any objects that you allocated or that your classes own the references to.

Alex Reynolds
Hmm, maybe I'm reading it wrong, but it looks to me like there's only one moment where there's a few leaks (the orange bar), which cummulatively are a total of 212 leaked bytes (the blue bars). Am I missing something?
Scotty Allen
That looks like pretty minor leaks.You probably want "Created and still living" to show memory that hasn't been freed.What does the app do? I'm wondering if there's memory that somehow isn't charged to your process.
David Dunham
A: 

Did you ever solve this problem?

I'm seeing a similar problem now, as far as I can tell I'm not leaking much memory, but after a while of stress testing my App it crashes.

My app involves views with many images and playing back of Movies. I do get memory warnings every now and then, but I release unnecessary memory and unload views when requested to, and according to the tools it seems like my memory usage goes back down.

relz