It’s not stated in documentation for CGImageSourceCopyPropertiesAtIndex function. But am i right that i should call CFRelease on retured CFDictionaryRef ?
Quick sample:
NSDictionary* metadata = (NSDictionary *)CGImageSourceCopyPropertiesAtIndex(source,0,NULL);
......................
//Should i call CFRelease(metadata); ??
Thanks.
Yes you should release it.
It doesn’t say it in the documentation because it’s a general convention. Every object returned by a function with
CopyorCreatein its name is owned by you and should be released when you’re done.