@amaximov in most cases (including your example) it is completely enough to only remove sprite object and all events will be removed when the object gets garbage collected.
There is only one specific case found by the @bowerandy that when you add event listener to global object, but pass data as some local object, the local object will not be garbage collected until the global object is not collected.
Thanks ar2rsawseen! I read the thread and I understood that if I pass on objects to the event listener that are not the object doing the listening, I need to be very careful about keeping references. For example if I have object A and B, I pass on object B to a listener on object A. simply nilling object B will have no effect because somewhere in the event system there is still a reference to object B? In this case I'd need to remove the listener from object A, and only then nil object B. Is this correct understanding?
Comments
There is only one specific case found by the @bowerandy that when you add event listener to global object, but pass data as some local object, the local object will not be garbage collected until the global object is not collected.
Here is more information on this topic: http://www.giderosmobile.com/forum/discussion/2818/a-warning-about-memory-management-complacency#Item_1
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova