I've been reading a book about design patterns for Objective-C and many times I've read things like
id <AProtocol> obj;
But I think, in pratice, it's not really usable for a simple reason: in iOS you have to manage memory calling release on the object. If you declate it simple with "id <Protocol>
" and you need to release that obj, XCode is going to warn you that the "release" method is not in that protocol.
So a more reallistic approach would be
NSObject <AProtocol> *obj;
Am I right?