tags:

views:

15

answers:

1

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.

A: 

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 Copy or Create in its name is owned by you and should be released when you're done.

Mo
thanks, i was just confused that many CGImageCreate functions state it explicitly.