4 ms·
Hello. Mallory Paine here. I wrote FIC. This is not legacy code...it should be trivial to convert it to ARC and performance should be unaffected. I'm a bit old
by mallorypaine 13y ago
Hello. Mallory Paine here. I wrote FIC. This is not legacy code...it should be trivial to convert it to ARC and performance should be unaffected. I'm a bit old school myself so I chose to write it with manual retains. Does this approach make the code more difficult for you to use within an ARC project?
- nielsbot 13y agoIt might even be faster under ARC since I think the compiler can optimize some retain/release calls. I think the ARC retain and release may be faster than -retain/-release, but I'm not sure about that. Overall, yes, it's less smooth to include non-ARC code in an ARC project.
- jdewald 13y agoI was under the impression that ARC simply inserts the retain/releases into the code essentially write before the compile, so in theory would be equivalent.
- LinaLauneBaer 13y agoARC inserts the retain/release calls but once that is done there is an additional step where duplicate retain/release pairs are eliminated.
- allsystemsgo 13y agoWhy would you write it with manual retains? Who doesn't use ARC at this point?
- rbritton 13y agoIf the rest of the project is non-ARC it's easier in my experience to write new additions that way as well. I've only been using ARC on newly-created projects because having to add -fobjc-arc or -fno-objc-arc to dozens of files in Xcode is very, very tedious.
- hboon 13y agoYou can do a search to filter files in Xcode as well as cmd-click to select multiple files, the double click and enter the flags once for all of them.
- cclogg 13y agoActually you have my support for going manual. I still prefer to do all my projects without ARC (and I'm not old-school, unless 2009 is old-school). I just feel dirty everytime I use ARC, like I'm being sloppy haha. It also hides a lot about memory management that new people might never learn (and thus be in bigger trouble when something does go wrong). But I accept that it does have major advantages... One trouble now is you never know if a library or whatnot will be ARC so it fragments things somewhat.
- alayne 13y agoIt wouldn't be our only non-ARC framework. It might be interesting to benchmark an ARC version though.