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.
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.
Attachments
Last edited: