I have a table which is filled with an array of objects, which I am observing, and when I delete all the objects, I remove the observer , but the problem is that when I delete all the objects in array and then again start adding it to the array I get removeObserver issue.
I have a strong reference to my object
I am adding Observer this way
[self.object addObserver:self forKeyPath:kTaskCompletedKey options:NSKeyValueObservingOptionNew context:&kTaskObservationContext];
and I am removing it this way
- (void)dealloc;
{
[self.object removeObserver:self forKeyPath:kTaskCompletedKey context:&kTaskObservationContext];
}
and also when I delete the object in the table using the delete method
I tried setting a breakpoint using NSKVODeallocateBreak, and what I observed is that it stops that the line @sythesize object = m_object;
and I dont understand what that means
So, friends please help me out
Regards Ranjit