One Quickie

Should you retain the delegate in your objects? (NSObject->General)
If you're creating an object, and you provide a delegate feature, should you retain the delegate? Nope! These objects are peers, not an owner/owned, or parent/child relationship. If you free your object, you shouldn't need to worry about memory management of your delegate. Likewise, if someone releases the delegate object, they should clean up after themselves and tell you to have a nil delegate.

borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book