selectedLine property holding on to the Line object


#1

In the deleteLine: method, after having declared the property as a weak type and then passing it as an argument in the removeObject: message, the selectedLine pointer is no longer supposed to hold on to the Line object.
Coz a removeObject: implementation must look something like this:

-(void)removeObject:(id)obj{ __weak id ptr; for (ptr in completeLines) { if(ptr==obj) obj=nil;// releasing a strong reference makes ptr as well as selectedLine automatically release the particular Line object. } }

But when I’m logging it to the console, it still appears to hold to the object:-

In the console I see the details of the Line object.

After this line- [completeLines removeObject:selectedLine], shouldn’t the pointer be pointing to nil immediately after this using the ARC principle. We already had made it weak type earlier.