If I use [UIImage imageWithCGImage:]
, passing in a CGImageRef
, do I then release the CGImageRef
or does UIImage take care of this itse
I agree with you -- the documentation is muddled at best for this API. Based on your experiences, then, I would conclude that you are responsible for the lifetime of both objects - the UIImage
and the CGImageRef
. On top of that you have to make sure the lifetime of the CGImageRef
is at least as long as the UIImage
(for obvious reasons).