The documentation probably says, but I'm a newbie and can't yet make sense of it all. I'm having all sorts of ARC errors trying to use it, but I'm hoping it's just my own mistake(s).
Asked
Active
Viewed 359 times
0

vikingosegundo
- 52,040
- 14
- 137
- 178

Joel Derfner
- 2,207
- 6
- 33
- 45
-
What sort if errors you are getting? – TeaCupApp Aug 04 '12 at 01:34
-
Two kinds: "ARC forbids Objective-C objects in structs or unions," "__strong only applies to Objective-C object or block points types; type here is 'struct CHBinaryTreeNode'." – Joel Derfner Aug 04 '12 at 01:39
2 Answers
1
As borrrden points out, it is easy o see it is not ARC-complient.
But: It doesnt have to be ARC-complient, you can activate/deactivate ARC for single files by adding the
-fno-objc-arc
compiler flag for those files.
add compiler flags in Targets -> Build Phases -> Compile Sources

vikingosegundo
- 52,040
- 14
- 137
- 178
-
The one danger here is that you need to make sure that the library follows proper naming conventions. If it doesn't, you will get memory leaks or over-releases unless you either rename the methods or add an attribute to state whether or not the method returns a +1 object. – borrrden Aug 04 '12 at 04:33
-
I ended up trying this but before long it got too complicated and there were too many things going on I didn't recognize, so I figured out a workaround. Of course, I haven't gotten the workaround to WORK yet, but that's a different matter. – Joel Derfner Aug 04 '12 at 06:23
-
another way could be, to compile CHDataStructures to a static library, and link that in the app target. – vikingosegundo Aug 04 '12 at 09:42
-
@borrrden, with ARC yu have the same danger, as it heavily depends on the naming conventions. – vikingosegundo Aug 04 '12 at 09:44
-
@vikingosegundo ARC-to-ARC shouldn't matter. The optimizer should optimize away the unneeded retains and releases in the end, since it is controlling the code inside the incorrectly named method as well. The problem is when ARC takes its cues from compiled code that wasn't compiled under ARC (since it can't interact with the non-ARC code in the same way). – borrrden Aug 04 '12 at 14:16
-
arc needs any code to be compliant to the naming conventions. or you have to add compiler tags manually. if a method#s name starts with `new…`, arc will deliver +1 retained object. – vikingosegundo Aug 04 '12 at 16:03
0
Look at 1) The last time it was updated (largely 2 years ago) and 2) The retain and release statements peppered everywhere. No, this project is not ARC compliant...

borrrden
- 33,256
- 8
- 74
- 109