If we dont use CFRelease using ARC what is the alternative.If we Use ARC then CFRelease is throwing the error.I have tried with _bridge and _bridge_transfer both are not working.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no alternative to
CFRelease.CFReleaseis necessary, ARC or not. ARC manages ObjC objects only.In some cases, the frameworks may provide a more specialized release for a certain type (e.g.
CGContextRelease), but really there is no alternative.CFReleasestates it is an error to passNULL. If that is the error you see and you do not want this behavior, you can always write your own wrapper function which first tests the parameter before passing.If you have a more specific error or more specific problem, we may be able to help more.