Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

converted my app to ARC but only 1 target shows ARC setting as YES?

I believe I successfully converted by app to ARC using the 'Refactor -> Convert to Objective-C ARC' tool but only one of my project targets has the setting:

enter image description here

And if I create anything using IB it is still generating retain / release / dealloc code?

Also I now have crashes I did not before because of memory use, so I am wondering if my project is in a half converted state that is causing me random memory issues.

How do I get these other targets to use ARC - or make sure they are using ARC?

like image 950
Slee Avatar asked Aug 27 '12 15:08

Slee


1 Answers

Manually change the flags to say YES. Also want to check and make sure that none of the files have the compiler flag "-fno-objc-arc" set. (I've run into projects that were half converted this way.)

If you're still running into memory issues, run the Leaks Instrument. Even with ARC, you can still have memory leaks like retain cycles where parent-child relationships retain each other. In such a case, you need to use weak pointers.

like image 173
nont Avatar answered Nov 04 '22 13:11

nont