Regarding your questions:
1) You do not have enough information to find out if newString should be canceled. For example, if character replacement was not really necessary, it would be wise for CFURLCreateStringByAddingPercentEscapes return the equivalent of [self retain] ; This is just one example. The broader question is "you cannot know." The usual approach here would be to use tools to find heap growth and leaks. For more google information, "saveCount is useless" (I will not rephrase it here.)
2) Yes.
3) CGImageRef not a bridge, but, as I understand it, CFRetain and CFRelease should work. The difference between CFRelease and CGImageRelease here is that the CFRelease parameter CFRelease not be NULL , while CGImageRelease will tolerate NULL parameters.
4) __bridge_transfer is a suitable annotation for use here. This "carries" the +1 counter on the side that ARC does not process on the side that it processes. In other words, __bridge_transfer simply tells ARC that it will need to create a release call for this pointer, even retain will never be generated through it.
ipmcc source share