-1

I'm having issues of Low memory Memory. Every time memory grows when push the view. When i run the Instruments i saw it is ImageIO_PNG_Data, which takes the grows lots of memory every time i push the view. My old application is working fine, but when i change some images it gives me low memory problem. Image URL: https://drive.google.com/file/d/0B5FeQzPDrl-oT2ZiZktuNWJONHM/view?usp=sharing Guys please have a look.

Thanks guys.

Sam
  • 1
  • 2
  • There is no point showing the _image_. What you need to do is show your _code_, which is evidently mismanaging the memory for the image. You need to describe your app and discuss exactly what you are doing when you "push the view" - and, in particular, how you reverse that procedure. – matt Jan 12 '15 at 04:36
  • I don't think your old application _is_ working fine. I suspect that whatever you are doing wrong, you were always doing wrong - but the bigger image elicits the low memory condition sooner. – matt Jan 12 '15 at 04:41

1 Answers1

0

I'm going to guess, on no evidence (since you have given no information at all), that you have set up a circle of push segues in your storyboard: you push view controller A, then push view controller B, then push view controller A, then push view controller B, and so on. Thus, you wind up with dozens of view controller A and view controller B all pushed on top of each other. And since every view controller A contains the image, you wind up with dozens of images. And so you eventually run out of memory.

If that is true, you need to understand that the opposite of a push segue is not a reverse push segue - it is a pop, or an unwind segue. Similarly for present (modal); the opposite is not another present (modal), it is a dismiss, or an unwind segue.

matt
  • 515,959
  • 87
  • 875
  • 1,141