-1

There is an item details screen where user can read all info about a selected item, and there is also an search bar in this screen where user can search for items then when they choose one, it will be displayed, because of complexity data, so I have to do this by pop current item view then push a new item view in.

Everything is ok when do this just some times, the problem happens when user do this about 25-30 times, app become slowly then crashes.

I guess that the should be a problem with memory but could not find out where it is.

Please help me on this, thanks!

enter image description here

Son Nguyen
  • 3,481
  • 4
  • 33
  • 47

1 Answers1

1

You have to find out where your memory grows. Then and only then you can find how to fix it. I'll give you few tips,

  • Go to Xcode -> Product -> Analyze to find out what are the places you're having memory leaks and avoid them.

  • Do more tests with Instruments also.

  • Don't allocate big images using,

    [UIImage imageNamed:];
    

    above method will cache the image. Instead use,

    [UIImage imageWithContentsOfFile:];
    
Damitha Raveendra
  • 1,721
  • 17
  • 24