Hi All,
I need a clarification in releasing the objects assigned to the protocol type.
I have a protocol name iTaskFinish;
I need to assign a particular object for this protocol to which class I have implemented the methods.
so I declared as .h as follows
id<iTaskFinish> taskFinish;
@property(nonatomic, retain) id taskFinish;
so if i assign someobject to this "taskFinish" as follows :
[self setItaskFinish:someObject]
do I need to release the object ??
I tried releasing the object as follows :
[iTaskFinish release];
but its giving a compilation warning as "protocol cannot be released"..
I am not clear that if we retain objects of some other class ,we need to release . But for protocol if we did not release the object retained, wont those memory gets leaked in the application
Any clarification would be greatly appreciated ...