Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Received memory warning

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.

like image 803
Zsolt Avatar asked Oct 25 '10 20:10

Zsolt


People also ask

What is memory warning?

onLowMemory() raises when the system global memory is low. If the global memory is okay but your process takes more than 24MB on old Android devices, it will crash and you'll never get a low memory warning.

How to handle memory warning in iOS?

Remove references to any temporary objects that you no longer need. If active tasks might consume significant amounts of memory, pause dispatch queues or restrict the number of simultaneous operations that your app performs. Failure to reduce your app's memory usage may result in your app's termination.

How do I reduce memory usage on my iPad?

The two most common solutions to clear storage space on your iPad is to delete photos/videos from your photo library or to uninstall apps. Before you delete anything though, make sure that you know how to backup the files you would like to keep. For example, you can keep a backup of your photo library on iCloud.


1 Answers

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.

like image 191
justin Avatar answered Oct 20 '22 00:10

justin