Frage

I am developing an iPad app. In my iPad if i run that app only then nothing happens, if i start some other apps nearly 4 to 5 then my app shows application received memory warning level 1 & application received memory warning level 2 and also in my app user has the ability to draw their work.i have stored that draw views (Max upto 50 views) in a NSMutableArray whenever the memory warning happened all the user drawings gets erased view gets loaded as in initial stage. I have also used core plot frame work in that app.I have also checked with Analyzer and Instruments tool there is leak in my app.

  1. What may the problem in that app ?

2 . How to avoid drawing views gets erased ?

  1. How to stop the memory warnings?
War es hilfreich?

Lösung

You can't prevent memory warnings -- they're part of the way the system works. When it needs more memory, it sends warnings to the various running apps to get them to release memory that they don't need.

To prevent your drawings from being erased, you need to write them into one or more files so that you can restore them at a later point. You can then safely release the drawings when you get a warning, and read them back as you need them.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top