From MRC to ARC

I was trying to convert my project from MRC to ARC, and during this process, there're some problems that bothered me. Luckily, now I can run this new ARC project on my iPhone now, and it seems like no significant bugs for this moment.

Here're some converting tips and troubleshooting.

1、After Choose 'Edit'->'Refactor'->'Convert To ARC', there're lots of errors, and of course you failed. You should remove all release/ autorelease in the appropriate places and fix those bugs.

2、Set -fno-objc-arc to the third party files if they're not using ARC in the Compile Sources.

3、The biggest trouble for me is this: message sent to deallocated instance blah blah blah.

After I searched it, debug it and finally I think that's because of my inappropriate using of ARC. Though maybe the bigger part of this problem is because of ASIHttpRequest. Some objects released automatically and then when the request done and send back some infos through delegate or what else to this object, it just can't get through, here we come, the app CRASHED.

Now, I'm reading some StackOverflow Q&As and a book about Memory Management, I wish those will help.

http://stackoverflow.com/questions/13096740/message-sent-to-deallocated-instance-using-arc

你可能感兴趣的:(From MRC to ARC)