views:

47

answers:

1

I am working on an app with xml parser, uiwebview, navigationcontroller, displaying a lot of images on the main controller, that remains in the memory throughout the whole life of the app. I store my data using core data.
I tried to figure out the memory footprint of the application since I am getting the following warnings:

Received memory warning. Level=1
app delegate received memory warning
main controller received memory warning
main controller received memory warning
RSSItem received memory warning

Received memory warning. Level=2
app delegate received memory warning
main controller received memory warning
main controller received memory warning
RSSItem received memory warning

The footprint is around 4MB, and jumps up to around to maybe 10 when I drill down and display UIWebViews with a significant number of images. Is that footprint too large? I assume that there are apps out that are considerably more complicated. From what I understand the apps have 40-70MB available, give or take, but definitely not 10MB limit. Anyone has any insight what can I do to fix it or work around the problem. I do not have leaks. I am afraid that the real problem is not the footprint but something else I am not aware of. Thanks for any help.

A: 

you have memory analysis tools in Instruments.app - this will show you much data related to allocations in your app.

if i had to guess: destroy images which are not visible.

Justin
Thanks Justin. Definitely it's a good idea to minimize memory usage if possible, and I am working on that. But still, 3-10MB is not that much. In the meantime I just uncommented the [super didReceiveMemoryWarning] in didReceiveMemoryWarning. It seems to work, although I am sure this is not the right way to fix the problem.
yw. also, you *should* call through `super` in your override. call through `super` first if you don't need specific behaviour.
Justin