Responding to memory warnings
A photo editing app gets frequent memory warnings and sometimes gets killed. In what order would you track down the cause?
A photo editing app gets frequent memory warnings and sometimes gets killed. In what order would you track down the cause?
Measure what's taking the memory first with Allocations and the Memory Graph. In a photo app, suspect decoded photo sizes and the cache policy, and fix the peak before you polish the warning handler.
Performance and debuggingShort answerAdvanced
You need to show a single 50MB photo on screen. If you just load it with…
#image #nscache #downsampling #memory
iOS system designMultiple choiceIntro
You show 60 thumbnails of 4000×3000 JPEGs in a 3-column grid and memory jumps to several…
#image #downsampling #memory
Performance and debuggingMultiple choiceBasics
You decode a 100×100 pixel RGBA PNG (3KB on disk) to draw it on screen. Which value is…
#image #memory
Performance and debuggingShort answerAdvanced
An iOS feature that edits and saves photos of tens of MB gets killed after a memory…
#downsampling #memory