|Mar 11, 2012, 09:28 PM||#1|
Why is my app taking up so much memory (>12MB)?
My app consists of an UIImageView that can hold an image from the photo library and some overlay controls for applying B&W, sepia, and enhance image effects using the NYXImagesKit library. When I select an image from the photo library I display it on the UIImageView and save the photo as a PNG image file to the app's Documents directory for persistence. Whenever I apply an effect to the image, I write that image with the effect applied as an additional PNG file (alongside the original) to the Documents directory. My problem is that when I click the controls to apply the image filters, the app uses lots of memory (above 12MB) and eventually crashes.
The app is built using ARC so theoretically memory leaks should be fairly well taken care of, so I'm guessing it's my actual way of adding effects that's inefficient and eating up resources. If any of you are seasoned programmers, could you take a look at my code and point out what's causing the huge memory usage? If you could that would be absolutely wonderful.
Instructions for the app: double-tap to reveal the overlay image effects controls and tap once to hide them.
Last edited by stephenbenedict; Mar 17, 2012 at 09:35 PM.
|Mar 17, 2012, 09:15 PM||#2|
In my original code, I applied image effects using the library NYXImagesKit and then saved those modified images as PNG files into my app's Documents directory using:
[UIImagePNGRepresentation(image) writeToFile:path atomically:YES];
[image saveToPath:path type:NYXImageTypePNG backgroundFillColor:nil];
|crashes, effects, image, memory, slow|
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|What is kernel_task and why is it taking up so much memory?||troye||Mac Basics and Help||69||Apr 21, 2015 10:53 AM|
|OS X Mavericks power efficient but taking too little memory||DoctorCrap||OS X Mavericks (10.9)||1||Nov 16, 2013 10:44 AM|
|Finder running too slow.(mds taking up too much memory)||hary536||OS X 10.8 Mountain Lion||4||Mar 22, 2013 02:03 AM|
|Best Note Taking App?||firestone12||iPad Apps||2||Feb 13, 2013 10:12 AM|
|Note-taking/life organising App: Best Apple app?||MacNoobGuy||Mac Applications and Mac App Store||1||Dec 16, 2012 03:21 AM|
All times are GMT -5. The time now is 03:02 PM.