Say there is an object A
A has a strong reference to B
B has a strong reference to C
Now, say the last reference to A is removed. Say A is in a stack and the function ends.
So A is gone.
At it’s dying breadth, does A notify B that it’s gone? Will B and C gone too?
-(void) foo
{
A * a= [[A alloc]init];
A.b = [[B alloc]init];
A.b.c = [[C alloc]init];
//end of function what happen here? Will a, A.b and A.b.c gone too? How exactly that work?
}
Your classes need to release their references when they are de-allocated.
I don’t think that ARC changes anything here (except inserting the release calls automatically).