Saturday, 12 June 2010

Resolved Why is my app taking up so much memory (>12MB)?


my app consists of uiimageview can hold image photo library , overlay controls applying b&w, sepia, , enhance image effects using nyximageskit library. when select image photo library display on uiimageview , save photo png image file app's documents directory persistence. whenever apply effect image, write image effect applied additional png file (alongside original) documents directory. problem when click controls apply image filters, app uses lots of memory (above 12mb) , crashes.

app built using arc theoretically memory leaks should taken care of, i'm guessing it's actual way of adding effects that's inefficient , eating resources. if of seasoned programmers, take @ code , point out what's causing huge memory usage? if absolutely wonderful.

instructions app: double-tap reveal overlay image effects controls , tap once hide them.
 

attached files:

update

in original code, applied image effects using library nyximageskit , saved modified images png files app's documents directory using:

code:
[uiimagepngrepresentation(image) writetofile:path atomically:yes];
i making these file writes frequently, tried switching file saving method 1 supplied in nyximageskit:

code:
[image savetopath:path type:nyximagetypepng backgroundfillcolor:nil];
though still not instant, change cut down on memory usage , speeded things sufficiently after adding activity indicator during image processing, app's responsiveness satisfactory.
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment