In Objective-C, I understand that if an object sets itself as the delegate of another object, it should set that object's delegate to nil
in its dealloc
to avoid getting sent messages after it's gone.
However, when using Accessorizer (an Xcode utility), the stub code it generates also puts a delegate = nil
in the dealloc
of the class that has the delegate instance variable. What is the purpose of that?