1.

When should you call dealloc method? Is it possible to implement dealloc in ARC?

Answer»

You can dealloc for memory management. Once an object “retainCount” REACHES 0, a dealloc message is sent to that object. Never call dealloc on objects unless you call [super dealloc]; AROUND the CLOSE of a overridden dealloc.
(void)dealloc
{
   [ivar release]; //Release any retained VARIABLES before super dealloc
   [super dealloc]; //Only place in your code you should EVER call dealloc
}



Discussion

No Comment Found