I can't find answer on that question. I have a project with old school MRC, and prefer to use this memory management style, but now some new frameworks creates initially with ARC. Can I include these frameworks in my project with any converting ways or what can I do in this situation except remake the whole project?
Asked
Active
Viewed 880 times
0
-
Have a look at this question for setting ARC on a per-file basis: http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project – gregheo Feb 29 '12 at 18:43
2 Answers
1
You could compile your ARC sources as static libraries... That's one way to do it, another would be enabling ARC per file basis

oanoss
- 86
- 4
1
You can use an ARC(MRC) (dynamic or static) library with a MRC(ARC) application. If you want to include the source of an ARC(MRC) framework into an MRC(ARC) you need to mess around with per file settings and IIRC reports suggest that though it works fine you may gets non-errors reported by Clang.
[Note: GC complicates the picture, e.g. you can't use a GC library from an MRC/ARC application.]

CRD
- 52,522
- 5
- 70
- 86
-
Ok, even if framework hasn't _weak modifiers does it make no difference to convert full mrc compatibility for old iOS? Because I need new framework for old version of os. – stworks Mar 01 '12 at 13:13
-
Different OS versions to the mix complicates issues. If you, say, have a framework designed to use ARC under 10.7 and it does not use weak references then if you compile it under 10.7 you can use it under 10.6 (and hence from a MRC application under 10.6). If it does use weak references it *may* still work fine but to ascertain that you would need to code-review the framework - under 10.7 weak references auto-null when the referred to object goes away, under 10.6 they do not. If this is relied on then the framework will malfunction under 10.6 (but is still technically "usable"). – CRD Mar 01 '12 at 17:23
-
Thx for the answer. To be honest, I forgot about **ios** tag, my question is about that OS. – stworks Mar 02 '12 at 13:17