Hi guys!
I'm not sure when it's the right moment to RELEASE a listener object.
I have a object A that uses NSURLConnection's initWithRequest method to retrieve some URL. initWithRequest requires a delegate to listen after the events of dataReceived... So object A creates an object B and passes it as a delegate for initWithRequest method.
When the data is retrieved from the network a method of object B is called. After object B has completed its work who has the responsability to release object B?!?
TO SUMMARIZE:
object A creates object B and make it listener for some event. The event happens and object B makes its job. After object B has done its job who has the responsability to release it?!?
PLEASE NOTE There are many questions and answers on how to remove Observers in Objective-C. Anyway all of them I found they assumed you are using the KVO pattern.