0

I am having trouble understanding dealloc, release, and setting things to nil. I built my app thinking that I could handle memory management at the end, and am now facing serious consequences. This was admittedly a bad way to begin development of my app, but you've got to start somewhere.

Is there a guide/documentation out there that tells me what items need to be deallocated, or how to go about it? I am using ARC, and know that I don't need to release things, but how do I know what items need to be set to nil in the dealloc method?

My app is now pretty slow as I have a lot of methods called in viewDidAppear, every time the view appears it gets slower and slower. Just need a place to start. Any initial guidance would be much appreciated!

Thank you all!

yeesterbunny
  • 1,847
  • 2
  • 13
  • 17
Brandon
  • 2,163
  • 6
  • 40
  • 64
  • Possible duplicate: http://stackoverflow.com/questions/7906804/do-i-set-properties-to-nil-in-dealloc-when-using-arc – yeesterbunny Mar 01 '13 at 09:03
  • Also, what kind of method calls are you calling in `viewDidAppear`? I doubt your app is slowing down because of memory management since you are using ARC. You should consider using GCD to put some method calls in the background thread. – yeesterbunny Mar 01 '13 at 09:06
  • viewDidAppear is typically not a method where you do very much. If the app gets slower every time it's called, I would guess that you perhaps add new views there? You should use viewDidLoad for that kind of one-time setup. – omz Mar 01 '13 at 09:22
  • Can you add the code for your viewDidAppear ? – Moxy Mar 01 '13 at 09:41

1 Answers1

1

http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1 Read this tutorial about ARC very helpfull.

Cintu
  • 913
  • 2
  • 16
  • 32