Xcode 4 and ARC compatibility #4

Closed
wants to merge 2 commits into
from

Projects

None yet

1 participant

@ghost

To use your nice lib with ARC and Xcode 4, we need to delete all calls to dealloc and autorelease stuff.
Also, to ensure compatibility with previous iOS versions, i let document and parent properties to "assign", but we could use the new "weak" setter attribute instead, to avoid dangling pointers.

@nfarina
Owner

Hi. I would love to merge this but I don't want to require everyone using SMXMLDocument to enable ARC. Enabling ARC on an existing codebase can be quite a project.

Instead, I added a note to the README that explains how to disable ARC for just SMXMLDocument. This should work great, and seems to be what a lot of "library authors" are doing for now. See: AFNetworking.

@ghost

Ok, i understand. But why not create an ARC-compatible branch ? It could also be useful for newcomers to iOS development (like me), and for new projects.

@nfarina
Owner

Yes that's a good idea. I'll see about making a new branch, merging your commit, and updating the README to direct people to that branch instead.

@ghost

Ok, thank you !

@nfarina
Owner

OK I cherry-picked your commits and made a few more tweaks and pushed the new "master_arc" branch with ARC support built-in:

https://github.com/nfarina/xmldocument/tree/master_arc

@nfarina nfarina closed this Oct 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment