If class A is using class B and class A is class B\'s delegate, is it ok if the delegate is set to nil in class B\'s dealloc? I have seen code usually resetting the delegate
As far as I know, its best practice to (assign) a delegate, such that you avoid circular references on retain counts for situations just like this. If you've set up the property properly, ie:
@property (assign) id delegate;
You shouldn't have to perform any memory management in the dealloc, as the retain count is not bumped when you call self.b.delegate = self; -- unlike using (retain) or (copy)
Make sense? It would be fine to set the delegate to nil, but whats the point?